The New Home of Oracle-wiki.net
The New Home of Oracle-wiki.net
All things oracle...
All things oracle...
A website for IT Professionals involved with Oracle database.
When you use the USE_HASH hint, it directs the optimizer to perform a hash join when combining each specified table with another row source. A hash join is particularly efficient for large unsorted datasets.
SELECT /*+ USE_HASH(myTab1 myTab2) */ col1
FROM myTab1, myTab2
WHERE myTab1.col1=Mytab2.col1
/
The NO_USE_HASH hint tells Oracle to avoid using hash joins. This means your query is typically more likely to use a nested loop or a merge join.
SELECT /*+ NO_USE_NL(myTab1 myTab2) */ col1
FROM myTab1, myTab2
WHERE myTab1.col1=Mytab2.col1
/
Notes
The following page gives more information on hash joins
Published on
Published 29th November 2024