ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle hints ? use_hash ? ordered ?

oracle hints ? use_hash ? ordered ?

原创 Linux操作系统 作者:lfree 时间:2007-04-28 00:00:00 0 删除 编辑

关键字: oracle hints use_hash ordered

今天优化一个sql语句,想使用hash join看看效果,无论如何使用提示,都无法改变执行计划。google,首先发现要可以使用LEADING,但是在8i下无效:
发现LEADING的意思是:
LEADING hint causes Oracle to use the specified table as the first table in the join order.An ORDERED hint will override this hint.

改用ordered后,在检查执行计划发现可以使用hash join。

ordered:Causes the SQL to be driven by the tables in the order left to right.

我将use_hash括号里面的表对调,并不能改变执行计划。

我很少使用hints,为什么会出现这个问题,自己不知道?


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-83017/,如需转载,请注明出处,否则将追究法律责任。

上一篇: 在线unix man page
请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    3454
  • 访问量
    7144848