SQL Server 执行连接的方式 - Merge Join
来源:互联网 发布:淘宝销量前十名产品 编辑:程序博客网 时间:2024/06/07 16:21
The merge join requires both inputs to be sorted on the merge columns, which are defined by the equality (ON) clauses of the join predicate. The query optimizer typically scans an index, if one exists on the proper set of columns, or it places a sort operator below the merge join. In rare cases, there may be multiple equality clauses, but the merge columns are taken from only some of the available equality clauses.
Because each input is sorted, the Merge Join operator gets a row from each input and compares them. For example, for inner join operations, the rows are returned if they are equal. If they are not equal, the lower-value row is discarded and another row is obtained from that input. This process repeats until all rows have been processed.
The merge join operation may be either a regular or a many-to-many operation. A many-to-many merge join uses a temporary table to store rows. If there are duplicate values from each input, one of the inputs will have to rewind to the start of the duplicates as each duplicate from the other input is processed.
If a residual predicate is present, all rows that satisfy the merge predicate evaluate the residual predicate, and only those rows that satisfy it are returned.
Merge join itself is very fast, but it can be an expensive choice if sort operations are required. However, if the data volume is large and the desired data can be obtained presorted from existing B-tree indexes, merge join is often the fastest available join algorithm.
- SQL Server 执行连接的方式 - Merge Join
- SQL Server 执行连接的方式 - Hash Join
- SQL server 内部实三种类型的物理连接运算:Merge join、Hash join、Nested loop join对比分析
- SQL Server中的三种物理连接图文解析:Loop Join,Merge Join,Hash Join
- 浅谈SQL Server中的三种物理连接操作(Nested Loop Join、Merge Join、Hash Join)
- oracle sql调优学习笔记(三)表的连接方式:NESTED LOOP、HASH JOIN、SORT MERGE JOIN
- Oracle执行计划中的连接方式nested loops join、sort merge joinn、hash join
- SQL Server 执行连接的方式 - Nested Loops Joins
- SQL Server Join 方式
- 浅谈SQL Server中的三种物理连接操作(HASH JOIN MERGE JOIN NESTED LOOP)
- 浅谈SQL Server中的三种物理连接操作(HASH JOIN MERGE JOIN NESTED LOOP)
- SQL JOIN 连接的几种方式
- sql join的5种连接方式
- sql server 中的几种join连接方式
- sql调优之执行计划之笛卡尔连接————MERGE JOIN CARTESIAN
- 多表连接的三种方式详解 HASH JOIN MERGE JOIN NESTED LOOP
- 多表连接的三种方式详解 HASH JOIN MERGE JOIN NESTED LOOP
- 多表连接的三种方式详解 HASH JOIN MERGE JOIN NESTED LOOP (转David)
- 使用VMWARE安装OS X 10.8 MOUNTAIN LION (多图/零基础/保证成功安装)
- SQL Server 执行连接的方式 - Nested Loops Joins
- 黑马程序员 一些个人总结的小基础知识点
- Jetty实战之 嵌入式Jetty运行Servlet
- 排序算法_快速排序
- SQL Server 执行连接的方式 - Merge Join
- mysql : 数据类型简介
- 利用Devstack测试OpenStack管理微软Hyper-V
- 关于directshow的SmartTee
- Multimedia Standards Introduction——标准发布之ISO MPEGx
- Please ensure that adb is correctly located at 'C:\Users\Administrator\android-sdks\platform-tools\
- Java中的Set,List,Map的区别
- 如何隐藏你写的ABAP代码
- 拒绝服务攻击(dos)