Skip to Content
Advanced MySQL 8
book

Advanced MySQL 8

by Eric Vanier, Birju Shah, Tejaswi Malepati
January 2019
Intermediate to advanced
286 pages
7h 41m
English
Packt Publishing
Content preview from Advanced MySQL 8

How to effectively read the EXPLAIN results

The role of the EXPLAIN tool is to display the running cost before executing your DML queries; it's like asking your vendor for a price estimate for goods before you buy. In other words, MySQL uses EXPLAIN to explain how it will execute your DML, including the table structure. Please note that since MySQL 5.7, the DML (Select, Update, Delete, Insert, and Replace) commands are allowed in EXPLAIN—that's why we will not just mention SELECT in our explanations.

The syntax and possible parameters are as follows:

    {EXPLAIN | DESCRIBE | DESC}     tbl_name [col_name | wild] {EXPLAIN | DESCRIBE | DESC}     [explain_type]     {explainable_stmt | FOR CONNECTION connection_id} explain_type: {   | FORMAT = format_name }
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

MySQL 8 Cookbook

MySQL 8 Cookbook

Karthik Appigatla
High Performance MySQL, 3rd Edition

High Performance MySQL, 3rd Edition

Baron Schwartz, Peter Zaitsev, Vadim Tkachenko
High Performance MySQL, 2nd Edition

High Performance MySQL, 2nd Edition

Jeremy D. Zawodny, Derek J. Balling, Baron Schwartz, Peter Zaitsev, Arjen Lentz, Vadim Tkachenko

Publisher Resources

ISBN: 9781788834445Other