MySQL is like living at your parents’ home: You sometimes consider leaving it, but when you consider the hosting costs, you often drop the idea quickly.
(Same applies to PHP. Hey, don’t shoot the messenger!)
The most painful part in MySQL, from my own experience, comes from Indexing. In particular, indexes are tricky to get it right, as the Query Optimizer of MySQL works by looking at the fields to scan, and trying to find a ‘best match’ between the (ordered) list of fields to scan + available indexes,
Long story made short: You’re likely to have created indexes (painful as it gets larger) which are not useful for all your queries (something with PostgreSQL done with the unexpected help of Genetic Programming)
So you need to enter in the mindset of the MySQL Query Parser, and understand how it works, specially by using EXPLAIN and Covering Indexes:
http://www.mysqlperformanceblog.com/2006/11/23/covering-index-and-prefix-indexes/
(Not sure if mytop would work)
|