When dealing with 1 GB databases…


…create good indexes.

This should be obvious, but for some reason I was getting frustrated with MySQL for taking almost 30 seconds to query a 1 GB table that only had a worthless index on a surrogate key. With proper indexing, the same query takes less than 1/10th of a second.