INDEX_JOIN

INDEX_JOIN Hint

The INDEX_JOIN hint instructs the optimizer to use an index join as an access path. For the hint to have a positive effect, a sufficiently small number of indexes must exist that contain all the columns required to resolve the query.

Each parameter serves the same purpose as in INDEX Hint. For example, the following query uses an index join to access the col1 and col2 columns, both of which are indexed in the myTab1 table.

Example

SELECT /*+ INDEX_JOIN(a myIndex1 myIndex2) */ col1
  FROM myTab1 a
  WHERE col2 < 200
    AND col1 < 10
/

Published 24th May 2022

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License