Use only FND_STATS or the Gather Schema and Gather Table Statistics Concurrent Programs.
Do NOT USE the analyze or dbms_stats command directly. It is not supported, and results in sub-optimal plans.To execute the corresponding FND_STATS procedures from SQL*Plus to gather CBO stats for one or all schemas, or for a particular table, use the following examples:# sqlplus apps/
SQL> exec fnd_stats.gather_schema_statistics('MRP'); SQL> exec fnd_stats.gather_schema_statistics('ALL'); SQL> exec fnd_stats.gather_table_stats('MRP','MRP_FORECAST_DATES');
为什么要使用FND_STATS , 而不是DBMS_STATS . 主要有以下的考虑:
fnd_stats 是 wrapper around dbms_stats , dbms_stats 是数据库提供的包。
fnd_stsats 只能用于EBS, dbms_stats 通用于数据库 。
fnd_stats 可以从某个failed / stopped point 重新开始,dbms_stats 在10g才有这个特性
fnd_stats 会根据FND_HISTOGRAM_COLS 中所列的行自动创建 histograms, dbms_stats 需要手工创建
fnd_stats 从11.5.10开始,可以为stale or empty stats收集统计信息,变化的threshold可以被改变(default 10%), dbms_stats 在11g以前,对于staleness的变化阀值一定是 10% .
参考
http://practicalappsdba.wordpress.com/2008/04/04/fnd_stats-vs-dbms_stats/
翻译的不知道对不对, 欢迎指正,补充。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/35489/viewspace-732185/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/35489/viewspace-732185/