Database Administration (MOSC)

MOSC Banner

Leading Hint - 19c DB

Dear Team,

In below query, we have used leading hint to start with table TEST_SALES which is aliased as "s". Hint was accepted. But in plan, first table read accesses was TEST_PRODUCTS table. Pls correct me if my understanding is not correct.

SELECT /*+
LEADING(s b@MY_SUBQ c p)
USE_NL(b@MY_SUBQ)
INDEX(b@MY_SUBQ)
USE_HASH(c)
USE_HASH(p)
/
c.customer_name,
p.product_name,
s.sale_amount,
s.sale_date
FROM test_sales s
JOIN test_customers c ON s.customer_id = c.customer_id
JOIN test_products p ON s.product_id = p.product_id

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center