Monday, October 5, 2015

Gather Database Statistics

Database Stat Gather
EXEC DBMS_STATS.gather_database_stats;
EXEC DBMS_STATS.gather_database_stats(estimate_percent => 15);

Schema stat gather
EXEC DBMS_STATS.gather_schema_stats('TEST');
EXEC DBMS_STATS.gather_schema_stats('TEST', estimate_percent => 15);

Table Stat gather
EXEC DBMS_STATS.gather_table_stats('TEST', 'EMPLOYEES');
EXEC DBMS_STATS.gather_table_stats('TEST', 'EMPLOYEES', estimate_percent => 15);

Index Stat gather
EXEC DBMS_STATS.gather_index_stats('TEST', 'EMPLOYEES_IDX_01');
EXEC DBMS_STATS.gather_index_stats('TEST', 'EMPLOYEES_IDX_01', estimate_percent => 15);

No comments:

Post a Comment