intermediate

MySQL

Use MySQL storage engines, indexes, transactions, and replication basics with awareness of engine-specific behavior.

MySQL interviews focus on InnoDB as the default transactional engine: clustered primary keys, secondary indexes, isolation, locking reads, replication lag, and failover semantics. Engine differences still appear in legacy or specialized workloads.

Subtopics: storage engines, indexes, transactions, replication basics.

On interviews: explain clustered index implications for primary key design, how read replicas affect consistency, and what happens during failover with binlog positions.

Common pitfalls: random UUID primary keys on wide tables; reading from lagging replicas for money paths; assuming MySQL isolation matches PostgreSQL without checking.

The trade-off is balancing simple primary-replica scaling against replication lag and split-brain risk during failover.

Checklist:

  • Default to InnoDB for transactional workloads.
  • Design primary keys for clustering and insert patterns.
  • Route reads with lag and consistency in mind.
  • Plan failover, binlog retention, and deadlock retries.