如何将说明计划视为好-Oracle 10G [英] How to consider Explain plan as good- Oracle 10G

查看:53
本文介绍了如何将说明计划视为好-Oracle 10G的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是Oracle解释的计划,认为是好的? 我正在尝试重构数据库架构,并且视图和程序包中的查询是如此之慢.

When an oracle explained plan is consider good? I'm try to refactor a DB Schema, and there are so many query in view and packages that are so slow.

例如,这是最糟糕的查询之一,请给我这个解释计划:

For example, this is one of the most orrible query, and give me this explain plan:

计划 ALL_ROWSC成本:18,096字节:17基数:1

Plan ALL_ROWSCost: 18,096 Bytes: 17 Cardinality: 1

我不问如何解决查询,只是问如何认为解释计划是好的.谢谢!!

I don't ask how to fix a query, just how to consider the explain plan as good. Thanks!!

推荐答案

在考虑解释计划的结果之前,我们需要了解以下术语, 基数–估计每个操作产生的行数.
•访问方法–通过表扫描或索引访问数据的方式 使用权. •连接方法–用于将表彼此连接的方法(例如,哈希,排序合并等). •联接类型–联接的类型(例如,外联接,反联接,半联接等). •连接顺序–表彼此连接的顺序.
•分区修剪–仅访问必要的分区来回答查询吗?
•并行执行–在并行执行的情况下,计划中的每个操作是否 并行进行?是否使用了正确的数据重新分配方法?

Before considering the result of an Explain Plan we need to understand following terminologies, Cardinality– Estimate of the number of rows coming out of each of the operations.
• Access method – The way in which the data is being accessed, via either a table scan or index access. • Join method – The method (e.g., hash, sort-merge, etc.) used to join tables with each other. • Join type – The type of join (e.g., outer, anti, semi, etc.). • Join order – The order in which the tables are joined to each other.
• Partition pruning – Are only the necessary partitions being accessed to answer the query?
• Parallel Execution – In case of parallel execution, is each operation in the plan being conducted in parallel? Is the right data redistribution method being used?

通过查看四个关键 基数估计,访问方法,联接方法和联接顺序的元素;您可以确定执行计划是否是最佳的可用计划. 本白皮书将帮助您 http://www.oracle.com/technetwork/database/focus-areas/bi-datawarehousing/twp-explain-the-explain-plan-052011-393674.pdf

By reviewing the four key elements of: cardinality estimations, access methods, join methods, and join orders; you can determine if the execution plan is the best available plan. This white paper will help you, http://www.oracle.com/technetwork/database/focus-areas/bi-datawarehousing/twp-explain-the-explain-plan-052011-393674.pdf

这篇关于如何将说明计划视为好-Oracle 10G的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆