PDA

View Full Version : Query Count On Various Pages


Dean C
15 Sep 2002, 10:43
I need an expert opinion on whether i have too many queries per page... here they are... please state wich pages have too may queries if you would please:

index.php: 30 queries

register.php: 11 queries

usercp.php: 23 queries

register.php: 11 queries

private.php: 11 queries

showthread.php: 27 queries

newthread.php: 12 queries

newreply.php: 20 queries


- miSt

N9ne
15 Sep 2002, 20:10
looks okay to me.

NTLDR
15 Sep 2002, 21:13
showthread will vary depending on how many posts ect, index at at the top margin. In general try to keep the number of queries bellow 30. If you site doesn't have large volumes of traffic then going over this limit a little won't have that much of an effect on the server.

NexDog
16 Sep 2002, 02:05
How do I determine how many queries I'm producing without installing the microstats hack?

Dean C
16 Sep 2002, 18:59
there's a line of code i noticed the other day in functions.php i think... its commented out... damn im gonna release this... pathetic excuse for my first hack lol

- miSt

NTLDR
16 Sep 2002, 19:30
Originally posted by NexDog
How do I determine how many queries I'm producing without installing the microstats hack?

You need to enable showqueries and add showqueries=1 to the end of the URL, or with older versions add explain=1

Erwin
16 Sep 2002, 23:42
Originally posted by NTLDR


You need to enable showqueries and add showqueries=1 to the end of the URL, or with older versions add explain=1

Turn debug mode to ON first, otherwise from 2.2.4 up showqueries won't work because of the security risk.

And @ the first poster - those numbers look good.

Dean C
17 Sep 2002, 16:30
turning debug on is a huge security risk i think or is it the other way round?

- miSt

Xenon
17 Sep 2002, 16:34
enabled debug mode is a security risk, you should turn it to off after you've done what you want ;)

btw: you should always be able to add $query_count into your footertable which should show you the ammount of querys

NTLDR
17 Sep 2002, 16:46
Originally posted by Xenon
enabled debug mode is a security risk, you should turn it to off after you've done what you want ;)

I know having debug on is a security risk, but would you mind telling us why? I've allways had it switched off anyway but would like to know what risks exisit by having it switched on.

futureal
17 Sep 2002, 19:25
Among other things, I know that leaving debug mode on will allow people to see your server layout (directory structure) and the exact locations of vB files.