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)

  • 相关阅读:
    python 正则表达式
    Python 集合
    Python 类的使用
    Python 分支、循环语句
    Python 基础之字典(dict)的用法
    Python 之字符串常用操作
    python tuple元组操作
    Python list的常用操作
    appium 二次切换webview后无法找到页面元素
    Locust API 文档
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6199305.html
Copyright © 2011-2022 走看看