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中表和結(jié)果集的Join順序. 我們通過如下示例看一下這個(gè)提示是如何影響SQL執(zhí)行的:SQL> SELECT /*+ leading(t_max) use_hash(t_max t_middle) */ COUNT (*)
新聞熱點(diǎn)
疑難解答
圖片精選