2 ms·
Each item on this list is largely unrelated to the others. 1. turn on your 'slow queries' log. read it. tune it down so that it becomes more sensitive. 1.5
by lsc 17y ago
Each item on this list is largely unrelated to the others.
1. turn on your 'slow queries' log. read it. tune it down so that it becomes more sensitive.
1.5 add indexes. use 'explain' to figure out what is slow about your slow queries. Indexes can quite often make those things less slow.
2. buy more ram. Buy a dedicated server if you have to. This is cheaper than you think. Make sure you replicate it somewhere, of course. Ram is many orders of magnitude faster than disk. Many, many problems just go away with the application of sufficient ram.
3. if your load is mostly read-only, replicate up a few read-only slaves. (when I setup webapps, I connect to two different database servers; a readonly and a read-write. At first, I point the dns records at the same server, but this makes it easier to split when performance requires it.)