Forum Moderators: coopster
So when accessing a thread, WebmasterWorld just goes straight to the file system. Each thread is a file. This works great for serving up pages with the lowest overhead, but it is a major stumbling block to getting good site search going.
The thing is, if you are not serving up tons of pages concurrent, you will not see a difference with the this. Opening the connection to the DB and sending the query is costly, getting an extra couple of columns should not be that costly.
Realistically, any page that renders with just a couple DB calls is still going to be really fast. Some CMS systems can send over 100 DB requests for "static" pages and when you get into something that's gathering price lists, navigation structure etc etc etc from the DB, large numbers of calls is quite common.
Thanks for all the valuable input!
I agree with ergophobe but also would rather say 6 queries per page rather than 12. That doesn't mean 12 is bad but as ergoophobe pointed out
"reasonably sized tables that are indexed intelligently and well-designed should be very fast"
it depends on so many factors that it is safer to recommend a lower number ;)
You also need to remember that as sites get more traffic or are dealing with larger and larger datasets load will increase. Concurrent users is always something to keep in mind as well.
- A single query can be a huge load on the server depending on what it is.
- If you have lots of queries or a few slow ones, you should look into some sort of caching if at all possible.
If the page is not responding to user input, but is just serving up the news of the day, for example, it might take a dozen queries to render the page once, but if you cache it, you might be able to retrieve it with a single query for each subsequent view until it changes.