about:benjie

Random learnings and other thoughts from an unashamed geek

MySQL Tips

A few tips/notes I have picked up along the way that may help someone out/remind myself:

Beware of big rollbacks of mass inserts: `InnoDB` uses the insert buffer to save disk I/O in inserts, but no such mechanism is used in a corresponding rollback. A disk-bound rollback can take 30 times as long to perform as the corresponding insert. Killing the database process does not help because the rollback starts again on server startup. The only way to get rid of a runaway rollback is to increase the buffer pool so that the rollback becomes CPU-bound and runs fast, or to use a special procedure.

MySQL scalability (vs PostgreSQL): http://tweakers.net/reviews/649/7