• Mysql SQL优化系列之——执行计划连接方式浅释


    关系库SQL调优中,虽然思路都是一样的,具体方法和步骤也是大同小异,但细节却不容忽视,尤其是执行计划的具体细节的解读中,各关系库确实有区别,特别是mysql数据库,与其他关系库的差别更大些,下面,我们仅就SQL执行计划中最常见的连接方式,做以下简要介绍和说明。

    1. system : a system table which is a constant table(访问一个常量系统表);
    2. const : a constant table(访问一个常量表);

    3. eq_ref : a unique or primary index with an equality relation(通过等值操作去访问一个唯一或主键索引);

    4. ref : an index with an equality relation, where the index value cannot be NULL(通过一个等值操作去访问一个不包含null值的索引);

    5. ref_or_null : an index with an equality relation, where it is possible for the index value to be NULL(通过等值操作去访问一个可能包含null值得索引);

    6. range : an index with a relation such as BETWEENIN>=LIKE, and so on(通过类似between,in,>=,like等操作去访问一个索引);

    7. using_index:a covering index is used(通过覆盖索引访问一个索引);

    8. index : a sequential scan on an index(通过顺序扫描方式访问一个索引);

    9. ALL : a sequential scan of the entire table(通过顺序扫描方式访问整张表)。

    此外,mysql中,无论对表或索引的访问操作还是多表间的连接操作,一般都统称为连接,这里,大家需要注意。

  • 相关阅读:
    【C++】关于new分配空间
    【嵌入式】keil不识别野火高速dap的问题
    【Java】质数判断
    【学习方法】大学背知识点方法
    【算法】浮点数多次运算精确值下降
    【算法】main函数的堆栈溢出
    【算法】三值选中法
    【CC++笔记】register寄存器关键字
    JSON.parse()和JSON.stringify()
    webStorm使用和安装
  • 原文地址:https://www.cnblogs.com/lhdz_bj/p/9930838.html
Copyright © 2020-2023  润新知