View Full Version : Help with reducing Queries
pgowder
03-07-2003, 01:39 PM
Just installed the MicroStat hack and my main forum page show 150 queries!!
http://www.powwows.com/gathering
Any suggestions for reducing this?
Thanks!
amykhar
03-07-2003, 01:53 PM
I have a hunch that it's the number of active users today that is getting you. I had a similar problem with one of my styles, and turning on debug showed the queries all stemmed from that hack trying to find a template. I tinkered with things a bit (what I did won't apply to you because I turned it off for default members in addition to making sure all the templates were in the list.)
So, that is where I would start looking. Turn debug mode on, look at explain for that page, and you will have an idea of where to begin.
Amy
pgowder
03-07-2003, 01:57 PM
How do you run the explain and turn on debug?
amykhar
03-07-2003, 01:59 PM
You turn debug on by putting debug=1; in your config.php file. Then you bring up your forum home page like this:
http://www.powwows.com/gathering/index.php?explain=1
pgowder
03-07-2003, 04:42 PM
Ok, got that. And I have a huge page of info. How do I determing the problem?
pgowder
03-07-2003, 04:49 PM
Your guess was right!
forumhome_todayloggedinuser is showing up a few hundred times!
Did you remove that hack or rework it?
amykhar
03-07-2003, 04:52 PM
Let me go look at the code again and see if I can find the problem.
Amy
pgowder
03-07-2003, 04:55 PM
Thanks!
amykhar
03-07-2003, 05:25 PM
It seems you are using the version where the names don't display on the forumhome, but instead pop up in a new window.
When I had problems with this hack, it was only when I used a style that didn't display the hack. If I used a style that displayed it, queries were fine.
Did you modify the hack yourself, or did you use the version released by Mystic that creates the popup window? You might need to go to that hack's thread and have Mystic look at it because I see somebody else had issues with queries and it was never resolved.
The number of queries you have depends on how many people have logged in for the day.
Amy
pgowder
03-07-2003, 06:29 PM
Actually, I'm using the one where they all show, but I removed that template reference from forumhome hoping to reduce the queries.
Erwin
03-08-2003, 03:16 AM
Add the template to $templatesused to cache it at the top of index.php. See if that helps.
pgowder
03-10-2003, 02:27 PM
Just add that statements to the top of the index.php file??
amykhar
03-10-2003, 03:06 PM
Erwin, it's actually already there I believe. There was something else going on that I believe is a result of the fact that he isn't displaying the names on the main page.
Amy
pgowder
03-10-2003, 04:45 PM
So should I just unistall this and try a reinstall?
amykhar
03-10-2003, 05:07 PM
I don't think that would help pgowder. I think there is an actual problem with the version of the hack that you are using. For what it's worth, this problem probably wouldn't exist if you showed the names on the index.php the way the hack was originally written.
pgowder
03-10-2003, 05:12 PM
Ok, so is there a way to modify my install?
amykhar
03-10-2003, 05:25 PM
Can you send me your index.php so that I can see something please?
Amy
pgowder
03-10-2003, 05:30 PM
Sure, it's in your PM box.
amykhar
03-10-2003, 05:53 PM
Think I found your problem. Uninstall the hack that you installed. Then, go to post 16 of the online today hack and get that zip. That one is meant to display the online users in a separate window like you are doing and is slightly different than the original hack.
https://vborg.vbsupport.ru/showthread.php?postid=212603#post212603
I believe that will fix your problem.
Amy
pgowder
03-10-2003, 05:54 PM
Thanks for the help!
pgowder
03-10-2003, 06:04 PM
With it unistalled, I have only 24 queries much better!
What is a good target for index.php?
Erwin
03-10-2003, 10:33 PM
Under 30 should be fine. :) Compare it to stock, which is 17 queries.
pgowder
03-10-2003, 10:41 PM
Cool!! 25 isn't two bad for several hacks to the index.php.
How many on a view thread page is normal?
NSeXcellent
03-11-2003, 05:06 PM
Where can the microstat hack be found?
amykhar
03-11-2003, 05:14 PM
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=35811&highlight=stats" target="_blank">https://vborg.vbsupport.ru/showt...ighlight=stats</a>
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.