EasyEnv
Engineering/Courses/Catalog/MySQL/EXPLAIN and Query Tuning
MySQL
IntermediateLesson 11 of 1335 min · hands-on

EXPLAIN and Query Tuning

Part of the MySQL course

"This query is slow." You will hear that sentence for the rest of your career, and the tempting response is to start changing things: add an index here, rewrite the join, maybe it is the ORDER BY. Guessing is a poor way to tune a database, and it is unnecessary, because MySQL will simply tell you what it plans to do.

Open the terminal, connect as root (the password is easyenv, as in lesson 02), and give this lesson a fresh database of its own ...

Want to learn MySQL EXPLAIN and Query Tuning in a real environment?

Click below, get a fresh Linux box with MySQL ready to go, and work through EXPLAIN and Query Tuning hands-on with an AI tutor that knows your code.

Start this lessonEXPLAIN and Query Tuning

What you'll learn

  • EXPLAIN
  • Type column (ALL, ref, range, eq_ref, const)
  • Key and rows columns
  • EXPLAIN ANALYZE (MySQL 8+)
  • Adding a missing index
  • Slow query log

Read this lesson in your language

All lessons in this course

13 lessons
  1. 1What is MySQL20 min
  2. 2The mysql CLI and First Commands25 min
  3. 3Creating Databases and Tables30 min
  4. 4Data Types30 min
  5. 5SELECT and WHERE30 min
  6. 6Joins35 min
  7. 7Aggregates and Grouping30 min
  8. 8Indexes30 min
  9. 9Transactions and Storage Engines35 min
  10. 10Stored Procedures and Triggers35 min
  11. 11EXPLAIN and Query Tuning35 min
  12. 12mysqldump and Restore25 min
  13. 13Capstone: Design an Ecommerce Schema50 min

Explore other courses

EXPLAIN and Query Tuning - MySQL (English) | Engineering Courses