Home > 11g > Few points on Oracle statistics.

Few points on Oracle statistics.

March 24, 2014

How to delete statistics of a table or schame.

Use below method to deelete

1) check the existing stats. if possible store them.

select * from dba_tab_col_Statistics where table_name like ‘<TABLE_NAME>’ and owner=”;

2) EXEC DBMS_STATS.DELETE_TABLE_STATS (OwnName => ‘OWNER’,TabName => ‘TABLE_NAME’);

3) select * from dba_tab_col_Statistics where table_name like ‘<TABLE_NAME>’ and owner=”;

this should not return any records.

How to lock statistics.

you can use below method to lock the stats.

EXEC dbms_stats.lock_table_stats(”, ‘<TABLE_NAME>’);

Advertisements
Categories: 11g
%d bloggers like this: