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 查看分区表的更多相关文章

  1. MySQL Explain查看执行计划

    这篇博客写的还是蛮全的 http://www.cnblogs.com/songwenjie/p/9409852.html 在执行SQL的时候,经常有些SQL未正确使用到索引,导致程序变慢,通过使用ex ...

  2. MySQL 使用explain查看执行计划

    使用explain查看执行计划, 下面是针对这两条语句进行分析,其查询结果是一样的. EXPLAIN select n.id,n.title from info n inner join info_t ...

  3. MySQL通过Explain查看select语句的执行计划结果触发写操作

    [背景] 某某同学执行了一下Explain结果结果发现数据库有了一条写入操作,恭喜这位同学你的锅到货了,你签收一下: 对! 你没有听错,在一种场景下就算是Explain也会引发数据的写操作,就这是外层 ...

  4. mysql中explain查看sql语句索引使用情况

    explain + sql: mysql> explain select * from user; +----+-------------+-------+------+------------ ...

  5. [转]细说MySQL Explain和Optimizer Trace简介

    在开发过程中,对每个上线的SQL查询指纹(query figerprint)的质量都应有估算:而估算DB查询质量最直接的方法,就是分析其查询执行计划( Query Execution Plan ,即Q ...

  6. mysql explain和profiling

    语法:explain  select .... 变体: 1.explain extended select .... 将执行计划“反编译”成select语句: 运行show warnings 可以得到 ...

  7. MYSQL EXPLAIN执行计划命令详解(支持更新中)

    本文来自我的github pages博客http://galengao.github.io/ 即www.gaohuirong.cn 摘要: 本篇是根据官网中的每个一点来翻译.举例.验证的:英语不好,所 ...

  8. MySQL · 最佳实践 · 分区表基本类型

    MySQL · 最佳实践 · 分区表基本类型 MySQL分区表概述 随着MySQL越来越流行,Mysql里面的保存的数据也越来越大.在日常的工作中,我们经常遇到一张表里面保存了上亿甚至过十亿的记录.这 ...

  9. MYSQL EXPLAIN 很慢的原因

    今天同事在查看一个SQL的执行计划的时候,EXPLAIN语句跑了2分钟.SQL命令类似: SELECT * FROM (SELECT USERID,COUNT(*) FROM TBNAME GROUP ...

随机推荐

  1. jdbc 处理mysql procedure返回的多个结果集

    1:测试数据库表user mysql> desc user$$ +-------+-------------+------+-----+---------+----------------+ | ...

  2. Pascal's Triangle II 解答

    Question Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3,Ret ...

  3. redhat6.3 64位更新源(使用网易源)全过程记录

    本篇博客参考:http://chinaxiaoyu.diandian.com/post/2013-01-24/40046529897.首先在浏览器中输入http://tel.mirrors.163.c ...

  4. 【转】【漫画解读】HDFS存储原理

    根据Maneesh Varshney的漫画改编,以简洁易懂的漫画形式讲解HDFS存储机制与运行原理. 一.角色出演 如上图所示,HDFS存储相关角色与功能如下: Client:客户端,系统使用者,调用 ...

  5. Java安装根目录

    bin存放了Java的操作工具,比如编译工具javac.启动JVM的Java等 db存放了Java测试的数据库Derby,企业不用 include存放C++的头文件 jre运行环境,里面有JVM li ...

  6. 代码中实际运用memcached——java

    以下文章取自:http://jameswxx.iteye.com/blog/1168711 memcached的java客户端有好几种,http://code.google.com/p/memcach ...

  7. 在opensips中记录通话记录

    1.为acc表增加额外的字段记录主叫被叫进入mysql,选取opensips的数据库ALTER TABLE acc ADD from_uri VARCHAR(64) DEFAULT '' NOT NU ...

  8. 【二分答案nlogn/标解O(n)】【UVA1121】Subsequence

    A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, a ...

  9. .NET MySQL的参数化查询

    MySqlConnection conn = new MySqlConnection(SqlConnnectString); MySqlCommand cmd = new MySqlCommand(& ...

  10. Android Studio Errors

    1.The import org.apache.http.client; tip: cannot be resolved; resolve: add this line in build.gradle ...