1

Possible Duplicate:
What is the MySQL equivalent of PostgreSQL's EXPLAIN ANALYZE

I was wondering if there is a way in mysql to show the actual steps of the execution plan of an executed query.

For instance EXPLAIN SELECT ... shows what mysql WOULD do, but is there a way to actually execute the query and display the execution plan used in the execution?

I see that postgreSQL provides this functionality via EXPLAIN ANALYZE SELECT...

Is there any equivalent functionality in MySQL?

Community
  • 1
  • 1
ramirezd42
  • 71
  • 5
  • 1
    I don't think there is anything in MySQL that will give you the level of detail a PostgreSQL plan gives you. The only thing that somehow goes into that direction is the "profiler": http://dev.mysql.com/doc/refman/5.5/en/show-profiles.html –  Aug 09 '12 at 20:53
  • 2
    1 year ago. 5 seconds searching: http://stackoverflow.com/questions/6812655/what-is-the-mysql-equivalent-of-postgresqls-explain-analyze – Alfabravo Aug 09 '12 at 20:53
  • @spencer7593: the manual clearly states that MySQL shows an "estimate" as well - and ramirez is **not** comparing to Oracle but to PostgreSQL –  Aug 09 '12 at 21:48
  • @spencer7593: from here: http://dev.mysql.com/doc/refman/5.5/en/explain.html Quote: "*MySQL explains how it **would** process the statement*". And the experience that a statement takes hardly any time to "explain" even when it takes minutes to run. –  Aug 09 '12 at 21:56

0 Answers0