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)
Mysql explain 查看分区表
转载本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
上一篇:bzoj 4584: [Apio2016]赛艇【dp】
下一篇:面向对象
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
MySQL从表分区查询数据 mysql 查询分区表
前言: 分区是一种表的设计模式,通俗地讲表分区是将一大表,根据条件分割成若干个小表。但是对于应用程序来讲,分区的表和没有分区的表是一样的。换句话来讲,分区对于应用是透明的,只是数据库对于数据的重新整理。本篇文章给大家带来的内容是关于MySQL中分区表的介绍及使用场景,有需要的朋友可以参考一下,希望对你有所帮助。MySQL在创建表的时候可以通过使用PARTITION BY子句定义每个分区存
MySQL从表分区查询数据 mysql 分区 mysql 分区表 mysql 多列合并为一列 mysql报错2003