MyBB Community Forums

Full Version: 97 SQL queries - Bad?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6
We've been researching this, because one page of posts on our forum (10 posts by default) is over 100 queries, typically 98-115.

(Disclaimer: We're running 1.6.4 and haven't updated all of our plugins yet - waiting till we upgrade.)

We've discovered these things:

Fastrep (1.3.1) adds TWO queries per post: one to show the rep buttons and one to show who repped and how much rep was given. Our members REALLY like this feature and would love to see this done with one query- it would decrease the default thread view by ten queries (a 50% savings). If the author wanted to get clever he could even reduce it to one query per page and use javascript to place all of the values in after.

Google SEO (1.1.13) adds one query per post. This can be remedied by not using the the SEO-friendly username link redirect.

MyAdvertisements adds two for every post looking for zone_3 whether or not you use it or not. Removing zone_3 from your template removes half of these queries, but he hard-codes another query into his plugin file at line 490 (version 1.9.2)

Not included in the above view, but on the homepage, Prostats adds TONS of queries. We removed some of the fluff and now have it whittled it down to just showing recent posts, but it's still around 30 queries to show the ten latest posts.
You should consider updating Google SEO. The current version has several options regarding queries in posts (in particular the quote back references) and queries in general. It also does more extensive caching.

For showing the ten latests posts, you could try the Overview plugin. It's a bit neglected though... AJAX is semi broken. But it uses a cache so it does not necessarily query on every page load. I'll have to revamp the plugin sometime though.
Consider upgrading to My Advertisements 2.0.3, it significantly reduces the amount of queries ran. (please read the note #2 found on the first post of the release thread).
12 Queries for me Sad Confused
(2011-12-26, 09:31 AM)hamada27588 Wrote: [ -> ]12 Queries for me Sad Confused

That's about average. Nothing to worry about.
Around 18 on index, 25-26 on forumdisplay and 29 on showthread.
After updating myBB and all plugins, including myadvertisements and google SEO, including tweaking a few plugins to work better, namely myadvertisements and eztrader, queries are now at 65 on homepage and 67 on a full page of posts.
35 queries when viewing a thread with a single post Sad
(2012-01-02, 07:52 PM)Monaco Wrote: [ -> ]After updating myBB and all plugins, including myadvertisements and google SEO, including tweaking a few plugins to work better, namely myadvertisements and eztrader, queries are now at 65 on homepage and 67 on a full page of posts.
35 queries when viewing a thread with a single post Sad

That's still enormous.
I would still cut out several more plugins.
(2012-01-03, 02:51 AM)labrocca Wrote: [ -> ]
(2012-01-02, 07:52 PM)Monaco Wrote: [ -> ]After updating myBB and all plugins, including myadvertisements and google SEO, including tweaking a few plugins to work better, namely myadvertisements and eztrader, queries are now at 65 on homepage and 67 on a full page of posts.
35 queries when viewing a thread with a single post Sad

That's still enormous.

Curious, what's HF like these days query wise.
Pages: 1 2 3 4 5 6