Does Oracle re-hash the driving table for each join on the same table columns?
Posted
by thecoop
on Stack Overflow
See other posts from Stack Overflow
or by thecoop
Published on 2010-06-02T08:53:18Z
Indexed on
2010/06/02
8:53 UTC
Read the original article
Hit count: 212
Say you've got the following query on 9i:
SELECT /*+ USE_HASH(t2 t3) */
* FROM
table1 t1 -- this has lots of rows
LEFT JOIN table2 t2 ON t1.col1 = t2.col1
AND t1.col2 = t2.col2
LEFT JOIN table3 t3 ON t1.col1 = t3.col1
AND t1.col2 = t3.col2
Due to 9i not having RIGHT OUTER HASH JOIN, it needs to hash table1 for both joins. Does it re-hash table1
between joining t2
and t3
(even though it's using the same join columns), or does it keep the same hash information for both joins?
© Stack Overflow or respective owner