Mysql explain 查看分区表

mysql> explain select * from ClientActionTrack where startTime>'2016-08-25 00:00:00' and startTime<'2016-08-25 23:59:00';
+----+-------------+-------------------+------+---------------+------+---------+------+-------+-------------+
| id | select_type | table             | type | possible_keys | key  | key_len | ref  | rows  | Extra       |
+----+-------------+-------------------+------+---------------+------+---------+------+-------+-------------+
|  1 | SIMPLE      | ClientActionTrack | ALL  | NULL          | NULL | NULL    | NULL | 33868 | Using where |
+----+-------------+-------------------+------+---------------+------+---------+------+-------+-------------+
1 row in set (0.00 sec)


mysql> explain extended select * from ClientActionTrack where startTime>'2016-08-25 00:00:00' and startTime<'2016-08-25 23:59:00';
+----+-------------+-------------------+------+---------------+------+---------+------+-------+----------+-------------+
| id | select_type | table             | type | possible_keys | key  | key_len | ref  | rows  | filtered | Extra       |
+----+-------------+-------------------+------+---------------+------+---------+------+-------+----------+-------------+
|  1 | SIMPLE      | ClientActionTrack | ALL  | NULL          | NULL | NULL    | NULL | 33868 |   100.00 | Using where |
+----+-------------+-------------------+------+---------------+------+---------+------+-------+----------+-------------+
1 row in set, 1 warning (0.00 sec)

mysql> explain partitions select * from ClientActionTrack where startTime>'2016-08-25 00:00:00' and startTime<'2016-08-25 23:59:00';
+----+-------------+-------------------+------------+------+---------------+------+---------+------+-------+-------------+
| id | select_type | table             | partitions | type | possible_keys | key  | key_len | ref  | rows  | Extra       |
+----+-------------+-------------------+------------+------+---------------+------+---------+------+-------+-------------+
|  1 | SIMPLE      | ClientActionTrack | p20160825  | ALL  | NULL          | NULL | NULL    | NULL | 33868 | Using where |
+----+-------------+-------------------+------------+------+---------------+------+---------+------+-------+-------------+
1 row in set (0.00 sec)



mysql> explain partitions SELECT *  from ClientActionTrack  PARTITION (p20160825);
+----+-------------+-------------------+------------+------+---------------+------+---------+------+-------+-------+
| id | select_type | table             | partitions | type | possible_keys | key  | key_len | ref  | rows  | Extra |
+----+-------------+-------------------+------------+------+---------------+------+---------+------+-------+-------+
|  1 | SIMPLE      | ClientActionTrack | p20160825  | ALL  | NULL          | NULL | NULL    | NULL | 33868 | NULL  |
+----+-------------+-------------------+------------+------+---------------+------+---------+------+-------+-------+
1 row in set (0.00 sec)