How good is to delete stats before gathering it again ?
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 )
Approach-2 :
1. gather table stats ( DBMS_STATS.
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 );
0