博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MySQL firstmatch strategy
阅读量:4550 次
发布时间:2019-06-08

本文共 1079 字,大约阅读时间需要 3 分钟。

在探讨subquery如 x IN (SELECT XX FROM TABLE)这样的形式的MATCH策略时,不是很清楚实现过程。在网上搜了一下,

地址:http://stackoverflow.com/questions/22300291/what-does-firstmatch-mean-in-a-explain-statement

 

It is a strategy that avoids the production of duplicates by short-cutting execution as soon as the first genuine match is found.

So FirstMatch(phonenumbers) means that as soon as we have produced one matching record combination, it will short-cut the execution and jump back to the phonenumbers table.

From 

  • The FirstMatch strategy works by executing the subquery and short-cutting its execution as soon as the first match is found.
  • This means, subquery tables must be after all of the parent select's tables that are referred from the subquery predicate.
  • EXPLAIN shows FirstMatch as "FirstMatch(tableN)".
  • The strategy can handle correlated subqueries.
  • But it cannot be applied if the subquery has meaningful GROUP BY and/or aggregate functions.
  • Use of the FirstMatch strategy is controlled with the firstmatch=on|off flag in the optimizer_switch variable.

转载于:https://www.cnblogs.com/oDoraemon/p/6269168.html

你可能感兴趣的文章
JavaScript 字符串(String) 对象
查看>>
How to use VisualSVN Server and TortoiseSVN to host your codes and control your codes' version
查看>>
微信小程序picker组件 - 省市二级联动
查看>>
Dynamics CRM 给视图配置安全角色
查看>>
Eclipse修改已存在的SVN地址
查看>>
C++ ACM基础
查看>>
(转)使用 python Matplotlib 库绘图
查看>>
进程/线程切换原则
查看>>
正则表达式语法
查看>>
20165301 2017-2018-2 《Java程序设计》第四周学习总结
查看>>
Vue的简单入门
查看>>
urllib 中的异常处理
查看>>
【SQL Server高可用性】高可用性概述
查看>>
通过SQL Server的扩展事件来跟踪SQL语句在运行时,时间都消耗到哪儿了?
查看>>
SQL优化:重新编译存储过程和表
查看>>
PCB“有铅”工艺将何去何从?
查看>>
Solr环境搭建
查看>>
垂直居中的几种实现方法
查看>>
UILabel标签文字过长时的显示方式
查看>>
H5离线缓存机制-manifest
查看>>