PDA

View Full Version : Finding out queries


djdonx
08-31-2007, 08:46 AM
Okay so I don't understand all this tech stuff ;p

I was just wondering, how do I find out how many server queries my forum is running and whats the ideal/maximum amount it should be?

Thanks in advance for any help :)

Antivirus
08-31-2007, 09:19 AM
you need to turn on debug mode. After doing so, you'll see a message in the forum telling how many queries are being run, and the option to run explain on them which will give you info on how well they are optimized.

djdonx
08-31-2007, 09:23 AM
How do I turn debug mode on? :S

Opserty
08-31-2007, 09:26 AM
How do I turn on debug mode?

Please note that you should not turn on debug mode in a live environment.

Open the config.php file.
At the top, on a new line below <?php
add: $config['Misc']['debug'] = true;
http://www.vbulletin.com/docs/html/templates_externalfiles

or you can add it at the very bottom of the config.php file.

djdonx
08-31-2007, 09:29 AM
Oh I think I'll give it a miss. I don't like changing the code alot like that, last time I did I broke my forum for 3 days. Hehe.

Antivirus
08-31-2007, 09:31 AM
You can also turn it on just for your ip so no-one sees it but you like follows:

// ****** DEBUG MODE ******
// Turn on debug mode for any specific ip.
$config['Misc']['debug'] = ($_SERVER['REMOTE_ADDR'] == 'xx.xxx.xxx.xx');


then simply replace xx.xxx.xxx.xx with your ip address. If you don't know your own ip, visit www.whatismyip.com