When you begin with a clean database, it's easy to optimize a database. Sometimes when dealing with a system that someone else has created, it takes some creative—or unconventional—optimization techniques. When cleaning up and adding indexes to a table to increase the performance of queries, for example, you might screw up performance in importing or executing bulk queries to those same tables. The following sections look at this situation, and more.
The biggest mistake in performance tuning is not measuring the gains. Before starting a performance-tuning pass on a database, make sure that an accurate list of processing and response times is available, and then measure the differences after the optimization pass.