大家好,欢迎来到IT知识分享网。
常常有人把这三个hint搞混,主要是因为对三种重写原理不清楚。特总结如下。(实验环境为
书第九章有介绍。他其实很像我们熟悉的neested loop,但它的独特之处在于会维护一个hash
hao2.object_id*10=1,如果条件满足,那么对于子查询,输入输出对,即为(1
们对于子查询来说,已经有输入输出对(2,1)在hash table里了,所以就不用去再次全表扫描
HAO2了,ORACLE非常聪明地知道object_id=2是结果集。这里,filter和neested loop相比,省
需要传递给子查询的输入(此例中为HAO1.object_id)的distinct value非常小时,FILTER就
hao1.object_id=hao2.object_id*10;
1038 rows selected.
如object_type)。
加上hint后,SQL会在1秒以内完成。
query block when the view has one or more base tables, provided the view does not
referencing query block only if complex view merging is enabled (as described
the right side of an outer join. If a view on the right side of an outer join has
only one base table, however, the optimizer can use complex view merging even if
an expression in the view can return a non-null value for a NULL. See “Views in
———————————————————————————
可见,对于此种身处outger join右侧的view来说,merge hint已经无能为力了。
push_pred则是针对unmergeable view使用外部查询谓词。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net//viewspace-/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net//viewspace-/
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/127236.html