oracle hints ? use_hash ? ordered ?

关键字: 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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/267265/viewspace-83017/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值