A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 329 companion flashcards using spaced repetition.
The primary goal of MySQL optimization is to reduce query response times and resource consumption while improving the database's ability to scale with growing workload. Optimizatio...
The EXPLAIN command is the primary tool for inspecting how MySQL plans to execute a SELECT query. Its output reveals the table access order, the join type used for each table, whic...
An index is a data structure that lets MySQL locate rows quickly based on column values, accelerating lookups, range filters, joins, and sorted access. By narrowing the rows MySQL...
Good schema design begins with choosing appropriate data types for each column. Smaller and simpler types consume less storage, fit more rows per page, improve cache hit rates, and...
The way a query is written often matters more than the configuration surrounding it. SELECT * is a common performance anti-pattern because it reads every column, preventing index-o...
Because InnoDB is MySQL's default storage engine, its internals strongly shape overall performance. The InnoDB buffer pool caches data and index pages in memory, so innodb_buffer_p...
InnoDB uses Multi-Version Concurrency Control (MVCC) to allow readers to see a consistent snapshot without blocking writers, which dramatically improves concurrency compared to sim...
Effective optimization depends on good observability. The slow query log, enabled via slow_query_log and thresholded by long_query_time, captures queries that exceed runtime budget...