|
If each page only makes 1 query then it may not be evident, but it depends on so many other things.
SQL servers are good at optimising how query queues are handled when using join / union queries but with a single monolithic table query it has to be executed at one shot so may be backing up other queries. Also the query construction can make huge differences as well.
For example;
A "SELECT * FROM" could take 30 to 50% longer to execute than a "SELECT fieldlist FROM" simply because the field wildcard (*) means that the table has to be read twice, once to get the field names, and again to get the data from each column.
Another consideration for monolithic vs normalised tables is the data redundancy and how it affects things, such as the storage and the transfer time between SQL server and webserver.
Consider the point of 20,000 records and if each record contains 50 characters of redundant data, that's 1,000,000 characters to be needlessly recovered and transferred. It's also 1,000,000 characters to be stored taking up valuable disk space.
Gaining 40 to 70% speed increases by normalising the structures and optimising queries is not unusual.
Unfortunately too few "developers" understand the DBA side of web development and simply follow the basic SQL tutorials without really understanding the implications of a simplistic design on the code they are developing and you then end up with a system that does not scale up well and performance will degrade rapidly once the system is put under any kind of serious load.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|