CREATE TABLE `transaction` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` char(1) NOT NULL DEFAULT 'T', `TrxRef` varchar(30) NOT NULL, `TrxType` varchar(20) NOT NULL, `TrxDate` date NOT NULL, ...
A missing quote made MySQL scan 7.2 million rows. Here's how EXPLAIN exposed the problem and what it taught us about safe ...