Most performance guides stop at caching plugins. The database is almost always the real culprit — here is how to find which queries are causing the slowdown and what to do about them.