Getting statistics of a table in Oracle What is more efficient to gather table statistics:


Using dbms_stats.gather_table_stats?
Using analyze table?
It's not recommended to use analyze to gather statistics (from 8i onward) because CBO(cost base optimizer) is build to recognize statistics that have been gathered using dbms_stats. So dbms_stats is a preferable way to gather statistics.