20 queries for viewing a thread?

Started by Yop, December 30, 2008, 06:03:33 PM

Previous topic - Next topic

Yop

Not sure if this is in the right section, but it seems to be support-related, w/e.

I've enabled viewing some debug information, specifically the page generation time(s) and the amount of queries used per page, and I noticed that SMF (2.0 b4) seems to use 19 or 20 queries just to display a single thread. Why's that? Does SMF really require that much queries to run just to display a thread page? Or is that mainly because of it still being a beta version and as such doing extra (database) logging?

I'm just wondering because of performance curiosity, we're moving our site to Bluehost soon and they seem to be pretty anal about CPU usage, just want to make sure we're not going to have that problem when we get there.

Kill Em All

I am currently using Bluehost right now, and yes, they do care about the CPU usage, but as long as you arent constantly going over the CPU usage, you should be fine. but that is something to look into.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Yop

Yeah, 20 queries for a single thread is kinda muh, imho. It would also be neat if some caching of sorts (i.e. full (thread) page being stored as plain HTML or everything in a single database table) could be added / implemented.

But does anyone know what those 20 queries are all used for, and/or if there's an easy way to see which queries have been executed?

vbgamer45

You can add the following to your settings.php

$db_show_debug = true;

Which will show the queries used on each page and files included.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: