zoukankan      html  css  js  c++  java
  • 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)

  • 相关阅读:
    Windows Phone 7 中常用Task
    设置Highchart柱子最大宽度( 让 highcharts支持maxPointWidth属性)
    Asp.Net MVC 使用FileResult导出Excel数据文件
    js获取网页高度
    使用window.addEventListener 和 window.attachEvent 判断浏览器
    slimscroll滚动条插件简单用法
    js中如何快速获取数组中的最大值最小值
    js 判断浏览器类型
    python使用ldap进行用户认证
    关于go声明切片的一些疑问
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350354.html
Copyright © 2011-2022 走看看