11 ms·
Table locks. This is specific to the default MyISAM engine, where it locks all tables used in a query for the duration of the query. So two queries that touch
by Izkata 3y ago
Table locks.
This is specific to the default MyISAM engine, where it locks all tables used in a query for the duration of the query. So two queries that touch the same table can't run concurrently.
You may never hit this as a problem if your queries are fast enough, but it is something to be aware of.
- cogman10 3y agoDidn't MySQL switch to InnoDB as the default engine a long time ago (my googling says 2010)? Does InnoDB have the same limitations?
- Izkata 3y agoI actually didn't realize they switched (we're still on an ancient version and unable to upgrade for now). InnoDB uses row-level locks, so it's extremely unlikely to cause such issues.
- erik_seaberg 3y agoInnoDB also supports transactions.