开源中文网

您的位置: 首页 > 数据库应用 > Oracle > 正文

DRIVING_SITE Hint

来源:  作者:

在分布式查询中,本地DB会获取远端表的数据进行关联,合理使用DRIVING_SITE,可以在分布式查询中大大减少网络流量,加快查询速度。 



The DRIVING_SITE hint instructs the optimizer to execute the query at a different site than that selected by the database. This hint is useful if you are using distributed query optimization. 

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 and the result set is returned to the local site. 

Tags:DRIVINGSITE Hint
关于开源中文网 - 联系我们 - 广告服务 - 网站地图 - 版权声明