title: MySQL, indexes and "Lock wait timeout exceeded"
body: <p>Today I have been working on some MySQL performance issues. I used EXPLAIN to find table scans and fixed some issues by creating indexes.</p>
  
  <p>My reads because super fast.</p>
  
  <p>But ever since, update queries are very problematic. When I restart Mysql, the first few inserts or updates work fine. After that, update queries start showing the error "Lock wait timeout exceeded; try restarting transaction" after 60 seconds.</p>
  
  <p>Is Mysql recreated large indexes on every insert/update? How can I solve this?</p>