Not part of my Don’t Assume series, but when a client states “Why is my database slow”", you need to determine if indeed the database is slow.
Some simple tools come to the rescue here, one is Firebug. If a web page takes 5 seconds to load, but the .htm file takes 400ms, and the 100+ assets being downloaded from one base url, then is the database actually slow? Tuning the database will only improve the 400ms portion of 5,000ms download.
There some very simple tips here. MySQL is my domain expertise and I will not profess to improving the entire stack however perception is everything to a user and you can often do a lot. Some simple points include:
- Know about blocking assets in your <head> element, e.g. .js files.
- Streamline .js, .css and images to what’s needed. .e.g. download a 100k image only to resize to a thumbnail via style …