The CREATE TABLE IF NOT EXISTS yields more locks than checking if the table exists using a SELECT first before running CREATE TABLE. This makes more sense as the table usually already exists, so we optimize for the happy path.
142 B
142 B
| @emigrate/mysql |
|---|
| patch |
Avoid "CREATE TABLE IF NOT EXISTS" as it's too locking in a clustered database when running it concurrently