The Ghost in the Database

A production debugging story: how an empty MySQL table took 20 seconds to query, and what InnoDB's history list taught me about MVCC and purge operations.