执行计划里面的FILTER 与 NESTED LOOPS 有什么区别
1个回答
2014-12-11
展开全部
Here is an example:
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.
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.
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
厦门鲎试剂生物科技股份有限公司
2023-08-01 广告
2023-08-01 广告
真菌(1,3)-β-D-葡聚糖检测用于血浆中(1,3)-β-D-葡聚糖的快速定量检测,用于侵袭性真菌感染的早期辅助诊断,真菌葡聚糖检测 ,请找厦门鲎试剂,近40年专注鲎试剂的生产和研发,详询:0592-2085561厦门鲎试剂生物科技股份有...
点击进入详情页
本回答由厦门鲎试剂生物科技股份有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询