View Single Post
Old 03-01-2010, 12:15 PM  
Tickler
Confirmed User
 
Join Date: Jul 2005
Posts: 650
Quote:
Originally Posted by Varius View Post
As for database / query optimization, I think that is EXTREMELY important.
One little thing that I've seen many times because the programmers don't understand the data.

You quite often see coding that looks something like this with test arranged in order:
Code:
switch ($someField) {
case "A": 
 do_A(); 
 break;
case "B": 
 do_B(); 
 break;
case "C": 
 do_C(); 
 break;
default:
 doOtherThing();
}
But if condition "C" equals 90% of the time, you should do the test for "C" first.

Very simple concept, that has major performance issues when dealing with high volumes. I've even written code that modifies this testing code based on current data being used.
__________________
Big Sister Live - Live sex club paid in Euros

Why all the PSYCHIC ads in the papers, and on TV?
Makes $$$s on the web @ Psychic Access
Tickler is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote