

Ask HN: MySQL expert anyone? - musikorama

I need to get a MySQL expert to help me optimize my database.<p>Mainmusik.com is a high traffic music site which is now getting slower and slower as the database getting bigger and bigger.<p>Anybody here want to share some experience?
Thanks!
======
lsc
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.)

