Home » Other » General » table partition (10g)
table partition [message #306573] Fri, 14 March 2008 13:54 Go to next message
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 #306574 is a reply to message #306573] Fri, 14 March 2008 14:03 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
You are collecting the statistics. Not checking.
http://www.itk.ilstu.edu/docs/oracle/server.101/b10759/statements_4005.htm

Oracle CBO make use of these statistics to lay the best path to fetch the data.
Re: table partition [message #306587 is a reply to message #306573] Fri, 14 March 2008 15:33 Go to previous messageGo to next message
balaji1482
Messages: 312
Registered: July 2007
Location: INDIA
Senior Member

thanks
Re: table partition [message #306620 is a reply to message #306573] Sat, 15 March 2008 02:21 Go to previous message
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
Previous Topic: What is this?
Next Topic: Does any one know about Core Banking Environments??
Goto Forum:
  


Current Time: Fri Nov 29 16:09:01 CST 2024