Tuning the MYSQL database.

If you are really desperate for increased performance, you can tune your mysql database by using isamchk to optimise the indexes:

isamchk -a /var/lib/mysql/gmail/display.ISM

isamchk -a /var/lib/mysql/gmail/details.ISM

Of course you need to be superuser and have the path correct. For more info consult your mysql online manual.