Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Driving_site hint ignored !!!

774653May 23 2010 — edited May 23 2010
Hi all,

I got a query which runs in database A , but queries all the tables from database B. Hence we have used driving_site hint , to run the query in database B itself.
There is only 1 input parameter 'from_date' in the query.
If we hard-core the input parameter, the query runs in under 2 mins.
But if we use Bind variable ( : ) to pass the value at run time, the query takes around 30 mins to execute!
Now if we check the explain plan of both the approaches, they differ.
Driving site hint is ignored , when the bind variable is used!! Hence the query takes eternity to complete.

Can anybody knows the work around of this issue? or atlest a root cause of it?
I have to use bind variable in the query..

Edited by: user10303997 on May 23, 2010 6:12 AM

Edited by: user10303997 on May 23, 2010 6:12 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2010
Added on May 23 2010
4 comments
1,965 views