5

When I see something like this in an Oracle query plan:

HASH JOIN
    TABLE1
    TABLE2

Which of these two tables is being hashed?

The Oracle documentation refers to a "smaller" table usually being hashed, but is there a guarantee that the hashed table will always be in a particular position (either top or bottom sub-node) when displayed inside a query plan?

Branko Dimitrijevic
  • 50,809
  • 10
  • 93
  • 167

1 Answers1

6

Example 9-3 Hash Joins, in the JOIN documentation, concerns an explain plan for hash joins. There is a sentence under the example which states:

In a hash join, the data set for the hash table always appears first in the list of operations (Step 2).

One remark; Oracle doesn't hash a smaller table, but a smaller dataset.

Branko Dimitrijevic
  • 50,809
  • 10
  • 93
  • 167
krokodilko
  • 35,300
  • 7
  • 55
  • 79