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)

相关文章:

  • 2021-09-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2022-02-20
  • 2021-09-02
  • 2021-10-29
  • 2021-09-12
猜你喜欢
  • 2021-09-06
  • 2022-12-23
  • 2021-12-18
  • 2021-06-08
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案