Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EXPLAIN keyword, does it execute query as well or just "explains" the query?

Tags:

sql

mysql

Does the EXPLAIN keyword in an INSERT or UPDATE statement execute the query, or is it just going to show ('explain') the query for you - newbie to MySQL and couldn't find the question quick enough.

like image 733
user2403316 Avatar asked Feb 07 '23 04:02

user2403316


1 Answers

Reference says

The EXPLAIN statement provides information about how MySQL executes statements:

Query is not executed. Some other databases have an 'EXPLAIN ANALYZE' which actually does the explain and does the query. Mysql does not have this feature

like image 190
middlestump Avatar answered Feb 10 '23 07:02

middlestump