Skip to content

MySQL Optimization Anki Textbook

A free, self-paced textbook in 7 chapters. Read a chapter, then drill it with the 329 companion flashcards using spaced repetition.

7 chapters · 329 cards · Updated

Chapters

  1. 1Foundations, Measurement, and the Optimization Mindset

    MySQL optimization is the practice of reducing query response times, lowering resource consumption, and improving overall scalability by carefully tuning schema design, indexes, qu...

  2. 2Reading Execution Plans with EXPLAIN

    The most important diagnostic tool for query tuning in MySQL is the EXPLAIN statement, which shows how the server intends to execute a SELECT query. The output reveals the order in...

  3. 3Indexing for Performance

    An index is a data structure that gives MySQL fast access paths to rows based on column values, dramatically reducing the number of rows the server must examine to satisfy a query....

  4. 4Writing Efficient Queries

    Even a perfect schema and rich indexes cannot rescue a poorly written query. Many real-world performance problems come from SQL patterns that force full scans, disable indexes, or...

  5. 5Schema Design, Data Types, and Table Structure

    Schema design sets the ceiling for what indexes and queries can achieve. Choosing appropriate data types is foundational: smaller, fixed-size types are faster to compare, more effi...

  6. 6InnoDB Internals, Configuration, and Concurrency

    InnoDB is the default storage engine, and most of MySQL's performance characteristics come from its internals. Its buffer pool caches data and index pages in memory, so `innodb_buf...

  7. 7Monitoring, Scaling, and Operational Practices

    Effective monitoring is what turns ad hoc optimization into a sustainable practice. The slow query log is a foundational tool: enabled with `slow_query_log` and thresholded by `lon...

← Back to the MySQL Optimization Anki deck