• ADADADADAD

    详解MySQL查询优化中的Using where 和 Using index概念[ mysql数据库 ]

    mysql数据库 时间:2024-11-29 09:52:40

    作者:文/会员上传

    简介:

    MySQL的查询执行计划中,Extra列经常会出现“Using where; Using index”。MySQL官方手册解释:Using index不读数据文件,只从索引文件获取数据Using where过滤元组和是否读取数

    以下为本文的正文内容,内容仅供参考!本站为公益性网站,复制本文以及下载DOC文档全部免费。

    MySQL的查询执行计划中,Extra列经常会出现“Using where; Using index”。

    MySQL官方手册解释:

    Using index不读数据文件,只从索引文件获取数据

    Using where过滤元组和是否读取数据文件或索引文件没有关系

    但MySQL手册在Using index处又说:

    1 没有Using where只有Using index:则不读数据文件,所有字段都可以从索引上获得(WithoutUsing where, the optimizer may be reading the index to avoid reading data rows but not using it for lookups)

    2 同时有Using where和Using index:因为“WithoutUsing where...”这句上下文,则意味着同时有Using where和Using index则一定需要读取数据文件

    其实不然。“Using where只是过滤元组,和是否读取数据文件或索引文件没有关系”。

    详解MySQL查询优化中的Using where 和 Using index概念.docx

    将本文的Word文档下载到电脑

    推荐度:

    下载
    热门标签: mysqlUsingwhereindex