Oracle Gather Stats

Gather Database Stats

EXEC dbms_stats.gather_database_stats; /* Gather Database Stats with default preference */
EXEC dbms_stats.gather_database_stats(cascade=>true,method_opt=>'FOR ALL COLUMNS SIZE AUTO');
EXEC DBMS_STATS.gather_database_stats(estimate_percent => dbms_stats.auto_sample_size, degree=>8 );

Gather Dictionary Stats

EXEC DBMS_STATS.gather_dictionary_stats; 

Gather FIX OBJECTS STATS

EXEC DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; 

Gather Schema Stats

EXEC DBMS_STATS.gather_schema_stats(ownname=>'OWNERNAME', estimate_percent => 25, cascade => TRUE);

Gather Table Stats

EXEC DBMS_STATS.gather_table_stats('Schema_name','Table_name');

Leave a Reply