Skip to content

Commit

Permalink
Create stats_delete.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
fatdba authored Mar 4, 2022
1 parent 623d2a2 commit 51b27c6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions stats_delete.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Delete statistics of the complete database

EXEC DBMS_STATS.delete_database_stats;

-- Delete statistics of a single schema

EXEC DBMS_STATS.delete_schema_stats('DBACLASS');

-- Delete statistics of single tabale
EXEC DBMS_STATS.delete_table_stats('DBACLASS', 'DEPT');

-- Delete statistics of a column
EXEC DBMS_STATS.delete_column_stats('DBACLASS', 'DEPT', 'CLASS');

--Delete statistics of an index

EXEC DBMS_STATS.delete_index_stats('DBACLASS', 'CLASS_IDX');

--Delete dictionary a in db

EXEC DBMS_STATS.delete_dictionary_stats;

0 comments on commit 51b27c6

Please sign in to comment.