Databases
Bug Report
MySQL ignored our phone number index because the app passed an integer
A customer lookup by phone number went from 2 ms to 3 seconds after a refactor, with the same index in place. The column was VARCHAR, the new code bound the value as an integer, and MySQL had to convert every row to compare. EXPLAIN, the conversion rules, and the fix.