【性能优化】ANALYZE 与DBMS_STATS的区别

简介:
From asktom
-------------
you can import/export/set statistics directly with dbms_stats

it is easier to automate with dbms_stats (it is procedural, analyze is just a command)

dbms_stats is the stated, preferred method of collecting statisttics.

dbms_stats can analyze external tables, analyze cannot.

DBMS_STATS gathers statistics only for cost-based optimization; it does not gather other
statistics. For example, the table statistics gathered by DBMS_STATS include the number
of rows, number of blocks currently containing data, and average row length but not the
number of chained rows, average free space, or number of unused data blocks.

dbms_stats (in 9i) can gather system stats (new)

ANALYZE calculates global statistics for partitioned tables and indexes instead
of gathering them directly. This can lead to inaccuracies for some statistics, such as
the number of distinct values.  DBMS_Stats won't do that.

Most importantly, in the future, ANALYZE will not collect statistics needed by
the cost-based optimizer.
相关文章
【性能优化】ANALYZE 与DBMS_STATS的区别
From asktom-------------you can import/export/set statistics directly with dbms_statsit is easier to automate with dbms_stats (it i...
728 0
|
关系型数据库 Oracle
PLSQL_性能优化工具系列03_DBMS_PROFILER / DBMS_TRACE / DBMS_HPROF(待整理)
占位符ERP技术讨论群: 288307890 技术交流,技术讨论,欢迎加入 Technology Blog Created By Oracle ERP - 鲍新建
820 0
|
SQL Oracle 关系型数据库
【性能优化】dbms_stats在ORACLE中的使用
dbms_stats能良好地估计统计数据(尤其是针对较大的分区表),并能获得更好的统计结果,最终制定出速度更快的SQL执行计划。   exec dbms_stats.
913 0
|
SQL Oracle 关系型数据库
PLSQL_性能优化系列16_Oracle Tuning Analyze优化分析
2014-12-23 Created By BaoXinjian 一、摘要 SQL是的全称是Structured Query Language(结构化查询语言)。SQL是一个在80年代中期被使用的工业标准数据库查询语言。
1202 0
|
SQL Oracle 关系型数据库
PLSQL_性能优化索引Index介绍(概念)
2014-06-01 BaoXinjian 一、摘要 在PLSQL查询优化中,使用和接触最多的应该是索引Index这个概念,个人也觉得对Index选择和优化是程式优化过程中比较重要的概念,特别是刚开始接触PLSQL性能优化 索引的一些概念 一个索引可以由一个或多个列组成, 对列设置索引...
1678 0
|
SQL Oracle 关系型数据库
PLSQL_性能优化系列15_Oracle Explain Plan解析计划解读
2014-12-19 Created By BaoXinjian 一、摘要 在SQL语句的执行计划中,包含很多字段项和很多模块,其不同字段代表了不同的含义且在不同的情形下某些字段、模块显示或不显示,下 面的描述给出了执行计划中各字段的含义以及各模块的描述。
1098 0
|
关系型数据库 Oracle
PLSQL_PLSQL性能优化总结(汇总)
oracle优化常用经典参考-dawn009-ITPUB博客ERP技术讨论群: 288307890 技术交流,技术讨论,欢迎加入 Technology Blog Created By Oracle ERP - 鲍新建
1054 0
|
SQL 关系型数据库
PLSQL_性能优化系列18_Oracle Explain Plan解析计划通过Baseline绑定
2015-05-28 Created By BaoXinjian 一、摘要 1. 应用场景 当运行很久的Job突然出现性能问题时,并排除数据量突然变大,可能原因有执行的脚本的某些对应的SQL的解析计划变更 2.
1043 0

热门文章

最新文章