Oracle Metalink offers a script to detect bugs on statistics at Note:
337096.1. As we all known, statistics gathered by the DBMS_STATS package can not make CBO always choose optimal execution plan, sometime it results to sub-optimal one. For more information on this topic, please refer to my posting at
http://www.oraclepoint.com/topic_134 [url=http://www.oraclepoint.com]BRvLEgkSXOraclePointuyoAvoU7L[/url]
Please see description of this script from oracle metalink below.
[url=http://www.oraclepoint.com]dOtNf39dgOraclePoint2i4hkKSwP[/url]
"The VALIDATE_STATS package helps Oracle Support and its customers to detect bugs and limitations of the statistics gathered by the DBMS_STATS package that could cause sub-optimal execution plans.
[url=http://www.oraclepoint.com]zXiNHW3IIOraclePointgdFs7TcKz[/url]
The package will evolve with time to expand its accuracy and detection criteria so check for a new version from time to time.
The package consists of a group of procedures that scan the stats of the tables and indexes located in the same schema where this package resides. Each procedure validates only one known issue and they can be executed independently and populate the VALIDATE_STATS_RESULTS table with its findings. Each result can be have 1 or more rows in the table." [url=http://www.oraclepoint.com]VIS2A1vhbOraclePoint71OMqlu4t[/url]