执行计划中三种最常用连接方式的伪码实现
2017-08-11 19:51
309 查看
1、NL
for each row R1 in the outer row source
for each row R2 in the inner row soruce
if R1 joins with R2
return (R1, R2)
2、merge
get first row R1 from input 1
get first row R2 from input 2
while not at the end of either input
begin
if R1 joins with R2
begin
output (R1, R2)
get next row R2 from input 2
end
else if R1 < R2
get next row R1 from input 1
else
get next row R2 from input 2
end
3、
for each row R1 in the build row source
begin
calculate hash value on R1 join key(s)
insert R1 into the appropriate hash bucket
end
for each row R2 in the probe row source
begin
calculate hash value on R2 join key(s)
for each row R1 in the corresponding hash bucket
if R1 joins with R2
output (R1, R2)
end
for each row R1 in the outer row source
for each row R2 in the inner row soruce
if R1 joins with R2
return (R1, R2)
2、merge
get first row R1 from input 1
get first row R2 from input 2
while not at the end of either input
begin
if R1 joins with R2
begin
output (R1, R2)
get next row R2 from input 2
end
else if R1 < R2
get next row R1 from input 1
else
get next row R2 from input 2
end
3、
for each row R1 in the build row source
begin
calculate hash value on R1 join key(s)
insert R1 into the appropriate hash bucket
end
for each row R2 in the probe row source
begin
calculate hash value on R2 join key(s)
for each row R1 in the corresponding hash bucket
if R1 joins with R2
output (R1, R2)
end
相关文章推荐
- 【Oracle】三种方式查看SQL语句的执行计划
- 浅析Oracle查看执行计划的三种方式
- SQL Server调优系列基础篇(常用运算符总结——三种物理连接方式剖析)
- 查看Oracle SQL执行计划的常用方式
- Android 三种常用多线程实现方式解析
- 实现ExpandableListAdapter三种常用方式
- 表连接方式概念以及在执行计划中执行步骤[摘]
- SQL Server调优系列基础篇(常用运算符总结——三种物理连接方式剖析)
- PHP定时执行的三种方式实现
- SQL Server调优系列基础篇(常用运算符总结——三种物理连接方式剖析)
- 查看sql执行计划时的表连接方式
- SignalR代理对象异常:Uncaught TypeError: Cannot read property 'client' of undefined 推出的结论 SignalR 简单示例 通过三个DEMO学会SignalR的三种实现方式 SignalR推送框架两个项目永久连接通讯使用 SignalR 集线器简单实例2 用SignalR创建实时永久长连接异步网络应用程序
- PHP定时执行的三种方式实现
- SQL语句的执行计划(oracle表的三种链接方式)
- JAVA多线程实现方式主要有三种:继承Thread类、实现Runnable接口、使用ExecutorService、Callable、Future实现有返回结果的多线程。其中前两种方式线程执行完后都没
- 分布式锁的三种实现方式 / 分布式锁原理及实现方式 / 分布式锁1 Java常用技术方案
- 图像灰度化的常用三种方式及其实现
- Oracle执行计划中的连接方式nested loops join、sort merge joinn、hash join
- Oracle的HINT可以强制指定SQL的执行计划,比如选择索引、表的连接顺序以及表的连接方式等等。(转)
- oracle执行计划之-表连接方式