The New Home of Oracle-wiki.net

All things oracle...

A website for IT Professionals involved with Oracle database.

LinkLinkedIn

USE_NL_WITH_INDEX

USE_NL_WITH_INDEX Hint Description

When you use the USE_NL_WITH_INDEX hint, you are telling the optimizer to perform nested loop joins.  More specifically, by applying this hint to a specific table and index, you are telling the optimizer to treat that table and index as the inner object in the join operation with another table. This can be very useful if you know that a nested loops join would be more efficient for your query.  For example, when joining small tables or when indexing supports fast lookups.

Example

SELECT /*+ USE_NL(myTab1 myInd1) */ col1 

  FROM myTab1, myTab2

  WHERE myTab1.col1=Mytab2.col1

/


Notes




Published on 

Published 26th November 2024