执行计划里面的FILTER 与 NESTED LOOPS 有什么区别

 我来答
福喜900
2015-01-27 · TA获得超过6.1万个赞
知道大有可为答主
回答量:1.1万
采纳率:0%
帮助的人:1亿
展开全部
select * from xa
where a >= all(select e from xb)

with the following Plan:
[-] SELECT STATEMENT CHOOSE Cost = 3802 (Cost = 3802 Cardinality = 95 Bytes = 1140 )
[-] FILTER ( )
[ ] TABLE ACCESS FULL SQLEXPS.XA ANALYZED (Cost = 2 Cardinality = 95 Bytes = 1140 )
[ ] INDEX FULL SCAN SQLEXPS.XB_INX ANALYZED (Cost = 40 Cardinality = 819 Bytes = 5733 )

The way Oracle perform to search data is:
Performs a filter operation. It accepts row sources from XA Full Scan, eliminates rows from XB Index Full Scan and returns the remaining rows from XA Full Scan to the user or application issuing the statement.

Nested Loops is used to find matched rows from A table(normally full scan or index range scan) to index scan B table. There is no definite answer which is better, since normally it cannot replace each other unless you rewrite your SQL in significant differently syntax.
本回答被提问者和网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式