table partition [message #306573] |
Fri, 14 March 2008 13:54 |
balaji1482
Messages: 312 Registered: July 2007 Location: INDIA
|
Senior Member |
|
|
hi all,
why do we run the analyse for table and index after creating partition for the table. what does it do??
below are the script that checks the analyse for table and index partition.
running CHECK FOR ANALYZE PARTITIONS TABLE
EXECUTE DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>'bala',TABNAME=>'tab1',PARTNAME=>'P1241',METHOD_OPT=>'FOR ALL INDEXED COLUMNS',DEGREE => 10,CASCADE => TRUE);
running CHECK FOR ANALYZE INDEX PARTITIONS
EXECUTE DBMS_STATS.GATHER_INDEX_STATS(OWNNAME=>'bala',INDNAME=>'P_IND_PGITH_\POLICY_14',PARTNAME=>'P1240',DEGREE => 10);
Regards,
Balaji
|
|
|
|
|
Re: table partition [message #306620 is a reply to message #306573] |
Sat, 15 March 2008 02:21 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
If you use CASCADE=>YES in the first statement you don't need the second one as CASCADE means also gather for indexes.
All this is explained in DBMS_STATS documentation and even if you have dragon seniors you can read it.
Regards
Michel
|
|
|