SQL hint between view & table [message #663966] |
Wed, 28 June 2017 10:09 |
kamragulshan
Messages: 66 Registered: May 2005 Location: Delhi
|
Member |
|
|
Hi Guys,
If we have a query running slow and we identified the cause say currently query is using Nested loop and performing slow and previously for the same operation it was going for hash join.
After identification we get to know that the issue is with the operation is having 2 tables and 1 view (view is based on 2 other tables).
Now question is:
1. Can a hash join be used between more than 2 objects.
2. How to use hint to use hash join when having view used in the query.
Appreciate for any help !
Thanks
|
|
|
Re: SQL hint between view & table [message #663967 is a reply to message #663966] |
Wed, 28 June 2017 10:14 |
John Watson
Messages: 8964 Registered: January 2010 Location: Global Village
|
Senior Member |
|
|
All types of join can join only two row sources at once. This is why the join order is so critical.
You can certainly push a hint into a view, the syntax is
/*+ use_hash(<view_name>.<table_name>) */
|
|
|
|
|
|