Customizing SMF > SMF Coding Discussion

Number of Queries in "Page created in..." string

(1/4) > >>

Oldiesmann:
I noticed something interesting earlier while comparing the speed of SMF to another forum system that prides themselves on speed. When you load the same page on an SMF board multiple times, the number of queries used to create that page tends to vary. For example, when loading the boardindex on this board twice in a 30 second period, one time it said it used 9 queries, and the next time it said it used 7 queries. Just curious as to what would cause this.

Chris Cromer:
Because some queries don't have to be run all the time.

For instance whenever there is a new record for the ammount of people online at 1 time it will add 1 more query to update the info.

Also some queries are only run based on how much time has passed. That means that the query won't be run again until the ammount of times has passed. An example of this might be updating the online list, for instance it could be set to only update your last online time every 15 minutes to save from running a query every click.

[Unknown]:
Which is very important for speed, because when you do redirecting (example: posting!) a lot, which all forums do, you end up hitting the database with WRITE queries TWICE as often as neccessary, which is veyr bad for MySQL 4 query caching.

So if you see a forum that DOESN'T vary, and pretends it's fast, it could still be faster.

-[Unknown]

Oldiesmann:
Cool. I figured it was something like that.

Homie:
What Are Queires

Navigation

[0] Message Index

[#] Next page

Go to full version