Database Tuning (MOSC)

MOSC Banner

How good is to delete stats before gathering it again ?

edited Sep 14, 2010 9:41PM in Database Tuning (MOSC) 9 commentsAnswered
Hi, Can you please tell me which one is better approach and why ?

Approach-1 :
1. delete stats on table (  DBMS_STATS.DELETE_TABLE_STATS )
DBMS_STATS.DELETE_TABLE_STATS(ownname=>'OW1',tabname=>'TAB1');
2. gather table stats ( DBMS_STATS. GATHER_TABLE_STATS )
dbms_stats.gather_table_stats
(ownname    => 'OW1',
tabname      => 'TAB1,
estimate_percent => 25,
method_opt => 'for all indexed columns ',
degree        => 8,
granularity  =>'ALL',
cascade     =>TRUE );
end;

Approach-2 :

1. gather table stats ( DBMS_STATS. GATHER_TABLE_STATS )
dbms_stats.gather_table_stats
(ownname    => 'OW1',
tabname      => 'TAB1,
estimate_percent => 25,
method_opt => 'for all indexed columns ',
degree        => 8,
granularity  =>'ALL',
cascade     =>TRUE );

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center