Log in

View Full Version : Too Many Queries?


The Finman
09-30-2006, 11:55 PM
Somewhere in these forums I thought I read that more than 10 queries for vB was too much (I believe the thread had a poster with 100+), and that the average number of queries shouldn't really be over 3.

I have on average about 13 queries (vB 3.6), and I noticed that vBulletin.org is averaging about 16 queries.

So, given that I have read most people having 20-30 queries, 13 doesn't seem that much.

My question is, did I mistakenly read somewhere that there shouldn't be usually more than 3 queries, and if I did then is 13 reasonable?

Thanks in advance.:)

~Fin

SCRIPT3R
10-01-2006, 12:03 AM
i wouldn't want 100 queries on a busy (100+ highly active users) forum, but anything less then 15 queries should me more then fine. of course it depends on what those queires are, but on average, i think you're ok.

Adrian Schneider
10-01-2006, 12:08 AM
It depends on the page, and on the queries.

If you have a ridiculous amount of queries (like 40+) you probably have them executing inside a loop which is in most cases unnecessary. 1 poor query could have far more server load than 100 efficient queries could ever have.

But with only 13, you have nothing to worry about. :)

BTW, every vbulletin page will start with 5 or 6, not including the content for that page. If the page has a lot of different content coming from different places (not all from a single table) then it may take many queries to pull the data correctly.

The Finman
10-01-2006, 12:24 AM
Thanks SirAdrian & GearTripper for the fast reply. :D

I guess either I didn't read it correctly or I didn't remember it correctly. ;)

I feel much better now. Again thanks :)