zoukankan      html  css  js  c++  java
  • mysql 索引对于select速度提升作用实验

    说明;News2在News的基础上把is_active加上索引。

    mysql> select count(*) from News2 where is_active=1;
    +----------+
    | count(*) |
    +----------+
    |  7820331 |
    +----------+
    1 row in set (14.77 sec)


    mysql> select count(*) from News2 where is_active=0;
    +----------+
    | count(*) |
    +----------+
    |  7797380 |
    +----------+
    1 row in set (14.56 sec)


    mysql> select count(*) from News where is_active=0;
    +----------+
    | count(*) |
    +----------+
    |  7797380 |
    +----------+
    1 row in set (35.20 sec)


    mysql> select count(*) from News where is_active=1;
    +----------+
    | count(*) |
    +----------+
    |  7820331 |
    +----------+
    1 row in set (35.12 sec)







  • 相关阅读:
    洛谷P2050 美食节
    洛谷P2150 寿司晚宴
    区间最深LCA
    三层交换机
    VLAN 及 GVRP 配置
    GVRP
    VLAN IEEE802.1Q
    以太网端口技术
    网关与路由器
    Quidway S系列交换机
  • 原文地址:https://www.cnblogs.com/catkins/p/5270442.html
Copyright © 2011-2022 走看看