There are several ways to gather statics in Oracle. It all depends on how wide you want to do your collection.
To gather statics for the whole database:
SQL> EXEC DBMS_STATS.gather_database_stats; To gather statics for a single schema: SQL> EXEC DBMS_STATS.gather_schema_stats('SCOTT'); To gather statics for a single table:SQ L> EXEC DBMS_STATS.gather_table_stats('SCOTT', 'EMPLOYEES'); To gather statics for a single index: SQL> EXEC DBMS_STATS.gather_index_stats('SCOTT', 'EMPLOYEES_PK');
For more information see:
http://www.oracle-base.com/articles/8i/CostBasedOptimizerAndDatabaseStatistics.php