explain用于获取查询执行计划信息,
一、语法
只需要在select前加上explain即可,如:
mysql> explain select 1;
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+----------------+
| id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filt