LEADING
LEADING
Leading Hint Description
Leading Hint Description
The LEADING hint can be used with more than one table or view. It forces the optimizer to use the the tables or views to be joined in the order specified in the hint. The first table specified is used to start the join.
This hint preferred over the ORDERED hint as it provides more flexibility. For example:
Example
Example
SELECT /*+ LEADING(a b) */ *
FROM MyTab1 a, MyTab2 b, MyTab3 c
WHERE a.col1=b.col1
AND b.col2 = c.col2
/
Notes
1. The hint is ignored if the tables cannot be joined in the order listed in the hint.
2. If two conflicting hints are used, then they are ignored.
3. The ORDERED hint overrides LEADING hints.
Published on
Published 21st February 2023