zoukankan      html  css  js  c++  java
  • 利用索引与不用索引区别(profiles)

    1、定义
      对数据库表的一列或多列的值进行排序的一种结构(Btree方式)=(相当于二分查找法)
    2、优点
      加快数据检索速度
    3、缺点
      1、占用物理存储空间
      2、当对表中数据更新时,索引需要动态维护,降低数据维护速度
    4、索引示例
      1、开启运行时间检测 :set profiling=1;
      2、执行查询语句
              select name from t1 where name="lucy99999";
            3、查看执行时间
              show profiles;
            4、在name字段创建索引
              create index name on t1(name);
            5、再执行查询语句
              select name from t1 where name="lucy88888";
            6、查看执行时间
              show profiles;

  • 相关阅读:
    威尔逊置信区间
    mysql函数
    python操作mysql之pymysql
    oracle 表分区
    Python连接sqlserver数据库之pymssql
    python-subprocess
    python-shutil
    python+logging
    公钥加密-DES-RSA
    python-Web-flask-蓝图和单元测试
  • 原文地址:https://www.cnblogs.com/zengsf/p/9572900.html
Copyright © 2011-2022 走看看