A storage engine determines how MySQL physically stores and retrieves data. InnoDB and MyISAM are the two most discussed engines, and interviewers love asking about their differences because the answer reveals how well you understand database internals.
Key Points
- InnoDB: default engine, supports transactions, row-level locking, and foreign keys
- MyISAM: older engine with table-level locking and no transaction support
- InnoDB offers crash recovery through redo logs; MyISAM risks corruption
- MyISAM can be marginally faster for read-only, full-table-scan workloads
- InnoDB's buffer pool caches data and indexes in memory for speed
- Verdict: use InnoDB for almost every modern application
.png)