MySQL speed question (12, permasaged)

6 Name: #!/usr/bin/anonymous : 2009-08-12 01:31 ID:OJY4A1Y5

>>4-5 are both failing to use the two important words that PHP programmers in general seem to be oblivious to: query optimization. If you write your queries properly, the database can cut down something that you might implement in three ugly nested loops manipulating two nested sets of associative arrays, as one btree lookup and a string comparison. Simply put, the database knows much more about the data than the view does.

However, in order to properly make use of this fact, you still need to construct your databases non-stupidly. That's where all those principles of normalizing data and setting up indexes and so on really make a difference between a big box that you throw all your paperwork into haphazardly and then sort them one at a time when trying to find what you want, versus a well-organized filing cabinet with labeled hanging folders in alphabetical order.

This thread has been closed. You cannot post in this thread any longer.