What is the MySQL equivalent of PostgreSQL's EXPLAIN ANALYZE

后端 未结 6 1288
孤城傲影
孤城傲影 2020-12-09 08:10

I\'d like to get a detailed query plan in MySQL similar to EXPLAIN ANALYZE shows in PostgreSQL. Is there an equivalent?

6条回答
  •  粉色の甜心
    2020-12-09 08:55

    just for clarity, comment on accepted answer (don't have enough karma to add comment)

    procedure analyse() is for a different purpose that EXPLAIN, it analyzes the data set of specified column and suggests the best data type, i.e. it's useful when we have 1000 rows of varchar(255) and want to check how much length do we really need, f.e. it might tell that varchar(23) would suffice

提交回复
热议问题