Box UK - be creative. be innovative. be bold.

Advanced Performance Techniques

Database optimisation

Spend some time examining all the different SQL statements that are made, and ensure that indices are built on common columns (i.e. those which crop up in ‘where combinations’).  You could also consider re-structuring the database, so as to de-normalise multiple tables into a single table.  Although all database design tutorials will specify that tables should be normalised, this is a good method for speeding up sites, as joining of tables is a slow process in most database servers.

If you are running MySQL version 3, consider upgrading to MySQL 4 or switching to SQL Server - both of these databases employ query caching, that can have a dramatic performance increase for database driven sites.

For SQL Server applications, also consider using triggers and procedures for common queries - these will lessen the amount of SQL transferred between applications, and the database server can precompile the queries for additional speed.