How to Move From ANALYZE/DBMS_UTILITY.ANALYZE_* to DBMS_STATS
Cost-Based optimization relies on accurate statistics to determine the relative
cost of execution plans. In Oracle 7, there was two methods to gather statistics:
Since the Oracle Version 8.1.5, a single package has been provided to gather
o DBMS_STATS package
It is strongly recommended to use the DBMS_STATS package and all the different
functions that are defined by it to handle the collect of statistics.
Using DBMS_STATS is the only way to access the new sampling functionality
provided in later releases since ANALYZE is not being enhanced.