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
I am running Google SEO with most if not all options enabled and my index page is 25 queries. Pretty sure its not that plugin causing problems.
I think it's that stats in footer he runs. Every one of those I have seen does a lot of queries.
If the OP wants to find what plugins are adding the queries, he can easily edit class_plugins.php

just add above both instances where call_user_func_array() exists, which would be once in run_hooks() and once in run_hooks_by_ref()

$this->current_hook = $hook.'-'.$hook['function'];

then in the advanced debug, each query that comes from a plugin will output the hook AND the function name that is being called. then he can see what plugin each is from
I have 33 - 40, which is bad for me.
Thanks very much for that code edit, paveman. The naughty plugin is ProStats. The plugin is executing a whopping 77 queries! Anybody know of an alternative plugin to just display new threads and posts? (And has a lower query count) That's really the only feature I wanted from ProStats.
can you turn prostats back on so i can see the output you want?

edit: or is that the 'ticker' that the top?

I looked at the latest ProStats download and I can not see 77 queries coming from just the latest posts/threads option. That is unless MyBB tracks queries differently in core code versus plugins.
Yeah, it's the "ticker".

And I'm 98% sure it's 77. Just to be sure though, I'll setup a dev board tomorrow and disable the plugin.
Screw the dev board, I went ahead and disabled it and my query count is now at 18. Wow.
14 Plugins
14 DB Queries (Index) Smile
35 DB Queries (Forum) Sad
(2011-02-16, 09:03 AM)KuJoe Wrote: [ -> ]35 DB Queries (Forum) Sad

That what I have, hope it's not Sad.
I have 19 on my index page, and 9 of them is for one plugin which only runs on the index page. (index boxes)
Disabling that plugin does not seem to effect page generation time much. (0.029 vs 0.027 seconds)

26 queries viewing a thread with 16 posts total, all on one page.
Pages: 1 2 3 4 5 6