The LEADING hint causes Oracle to use the specified table as the first table in the join order.If you specify two or more LEADING hints on different tables, then all of them are ignored. If you specify the ORDERED hint, then it overrides all LEADING hints.通过Leading 和 use_hash 提示连用,我们可以巧妙的影响SQL中表和结果集的Join顺序. 我们通过如下示例看一下这个提示是如何影响SQL执行的:SQL> SELECT /*+ leading(t_max) use_hash(t_max t_middle) */ COUNT (*)
新闻热点
疑难解答