Wednesday, October 29, 2008

Driving Site hint

I will first define DRIVING SITE Hint ( Oracle Performance Tuning manual ) :

DRIVING_SITEThe DRIVING_SITE hint forces query execution to be done at a different site than that selected by Oracle. This hint can be used with either rule-based or cost-basedoptimization.driving_site_hint::=where table is the name or alias for the table at which site the execution shouldtake place.
For example:SELECT /*+DRIVING_SITE(departments)*/ *
FROM employees, departments@rsite

WHERE
employees.department_id = departments.department_id;

If this query is executed without the hint, then rows from departments are sent to the local site, and the join is executed there. With the hint, the rows from employees are sent to the remote site, and the query is executed there, returningthe result to the local site.This hint is useful if you are using distributed query optimization.

and then finally for some more clarity please read -

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:456820211101

and please add your views..i will update this with more examples and real life examples.

No comments: