Subquery Optimizations Map

简介:

以下是显示SQL语言中允许的所有类型的子查询的映射,以及可用于处理它们的优化程序策略。

  • 无色区域表示不同种类的子查询,例如:

    • from x IN (select xx)
    • from () xxx
    • ...
  • 每个未着色区域的大小大致对应于该种子查询的重要性(即经常使用)的大小。 例如,x IN(SELECT ...)查询是最重要的,而EXISTS(SELECT ...)是相对不重要的
  • 彩色区域表示应用于处理各种子查询的优化/执行策略。
  • 底部的颜色表示它可用的是哪个版本的MySQL / MariaDB(请参阅下面的图例)
    image

在进行优化时,MariaDB不会评估昂贵的子查询(这意味着,EXPLAIN总是很快)。 MySQL 5.6在这方面取得了一些进展,但其优化器仍然会评估某些种类的子查询(例如,用于范围谓词的标量上下文子查询)

目录
相关文章
|
7月前
Stream方法使用-filter、sorted、distinct、limit
Stream方法使用-filter、sorted、distinct、limit
48 0
|
7月前
|
存储 SQL 关系型数据库
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column的解决办法
1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column的解决办法
87 0
|
10月前
ORDER BY子句
ORDER BY子句
35 0
|
SQL 关系型数据库 MySQL
【已解决】SELECT list is not in GROUP BY clause and contains nonaggregated column
MySQL5.7.5后only_full_group_by成为sql_mode的默认选项之一,这可能导致一些sql语句失效。
185 0
Distinct
SQL 去重
111 0
|
SQL 关系型数据库 MySQL
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre
344 0