Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

hash semi join and join selectivity

384305Dec 10 2008 — edited Dec 14 2008
Hi,

I'm looking for an explanation of the rule-of-thumb that hash joins are more efficient for high selectivity joins.

If I have a query with two tables, semi-joined together using an EXISTS clause, why would a hash join be better for a high selectivity join as opposed to a low selectivity join?

To clarify, my definition of selectivity is:

selectivity = # of rows returned / # of rows processed

Or in more database specific terms:

selectivity = num_rows/cardinality

Selectivity is a value between 0 and 1, so by high selectivity, I mean a selectivity value closer to 1.

Thanks for any input.

- KR
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2009
Added on Dec 10 2008
2 comments
2,024 views