我在文献中看到,就并行性而言,左深连接树不如右深连接树。给出的理由如下
X
/ \
/ \
X r6
/ \
/ \
X r5
/
/ \
r0 r1根据文献,在该连接树中,散列连接将以以下方式执行,
1. HashTable on r0 and then probe using r1
2. HashTable on r0 X r1 then hash probe using r5
3. HashTable on r0 X r1 X r5 and hash probe using r6但执行此连接的一种更简单的并行方法是
1. HashTable on r1, r5, r6 independently
2. HashProbe r1 using r0, use result to hash probe r5 and then r6
This can be nicely pipelined.为什么不能这样做呢?我是不是漏掉了什么明显的东西?
参考:http://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=1BBIHNuObz9vsFxaCtpKUeDg-Xif2kqRVnb0Mr_3IUah-RyTceFCANTq8drXW&hl=en_US (转至第18页)
我也在书中读到过类似的东西:http://www.amazon.com/Principles-Database-Processing-Applications-Management/dp/1558604340
发布于 2011-08-18 01:38:49
我想我知道它是如何工作的,我读过的所有地方,都假设HashBuild操作总是发生在左关系上。这就解释了为什么右深连接树具有比左深连接树更好的并行执行计划。
https://stackoverflow.com/questions/7073449
复制相似问题