Taylor J
Well-known member
I'm attempting to optimize my usage of queries when it comes to using the finder to find all blog posts from a blog.
Right now my query count is sitting around 20, sometimes a bit more, lowest I've seen is 17 though so far. When looking into the debug log when clicking on the render time it shows that I am querying attachments for every blog post.
I've tried to use a
I also haven't been able to find the way that XenForo handles it with article forums and their cover images in any of the post attachment code. Is there something special XenForo is doing to lower the query call amount for attachments when it comes to article threads/every where else?
Right now my query count is sitting around 20, sometimes a bit more, lowest I've seen is 17 though so far. When looking into the debug log when clicking on the render time it shows that I am querying attachments for every blog post.
I've tried to use a
->with('Attachments')
on the finder but get back the error that joins won't work on due to it only supporting TO_ONE relationships, when my blog posts have TO_MANY.I also haven't been able to find the way that XenForo handles it with article forums and their cover images in any of the post attachment code. Is there something special XenForo is doing to lower the query call amount for attachments when it comes to article threads/every where else?