oracle 您的解释计划中的 PARTITION RANGE ALL 是否不好?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3878029/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is PARTITION RANGE ALL in your explain plan bad?
提问by jonasespelita
Here's my explain plan:
这是我的解释计划:
SELECT STATEMENT, GOAL = ALL_ROWS 244492 4525870 235345240
SORT ORDER BY 244492 4525870 235345240
**PARTITION RANGE ALL** 207633 4525870 235345240
INDEX FAST FULL SCAN MCT MCT_PLANNED_CT_PK 207633 4525870 235345240
Just wondering if this is the best optimized plan for querying huge partitioned tables.
只是想知道这是否是查询大型分区表的最佳优化计划。
Using Oracle10g
使用 Oracle10g
回答by Jeffrey Kemp
PARTITION RANGE ALL
just means that the predicates could not be used to perform any partition pruning. More info.Or, that the alternative (scanning the table blocks instead of using a fast full scan on the index) was estimated to be more expensive overall.
PARTITION RANGE ALL
只是意味着谓词不能用于执行任何分区修剪。更多信息。或者,估计替代方案(扫描表块而不是对索引使用快速完整扫描)总体上更昂贵。
If you can change the predicate to limit the affected rows to a small subset of the partitions, the database will be able to skip whole partitions when querying the table.
如果您可以更改谓词以将受影响的行限制为分区的一个小子集,则数据库在查询表时将能够跳过整个分区。