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)

  • 相关阅读:
    CGLib实现不同类中同名不同类型属性复制
    stream 伪复用实现
    年终盘点 | 2020年,国内私有云正式进入3.0时代
    高危端口135,137,138,139,445,1025,2475,3127,6129,3389,593
    在jsp引入js失败,提示404
    安全漏洞扫描
    Go 实现的文件行数统计工具
    .NET Core 获取域名 DNS 解析记录
    .NET Core 操作 Windows 注册表
    .NET MongoDb BsonDocument 序列化
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199305.html
Copyright © 2011-2022 走看看