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)

  • 相关阅读:
    BZOJ2303:[APIO2011]方格染色(并查集)
    BZOJ1116:[POI2008]CLO(并查集)
    BZOJ4011:[HNOI2015]落忆枫音(DP,拓扑排序)
    洛谷1387 最大正方形
    洛谷 P1858 多人背包
    vijos 1085 Sunnypig闯三角关
    vijos 1030 重叠的方框
    codevs 1001 舒适的路线 WK
    1266. [NOIP2012] 借教室
    codevs 2370 小机房的树
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199305.html
Copyright © 2011-2022 走看看