Hi. I have a question about hash join — Does the join order matter in Oracle hash joins?
As far as I know, in hash joins, one table is used as a build table and the other as a probe table.
Unless the leading
hint is used (AFAIK, the first table in the leading
hint is the build table), the join order does not seem to affect the hash join.
For example, when the join order is A->B, the B table can be the build table, but A may be the probe table, or vice versa.
Whatever the join order, the build table appears to be at the top and the probe table appears at the bottom in the execution plan.
It seems to me that whatever the join order is, it only matters which table is set as the build table and which is set as the probe table.
In summary, I wonder what the join order means in hash joins. Could it be one of the major factors affecting the performance of the join?
(This question is likely to apply to the sort merge join too)