Home » SQL & PL/SQL » SQL & PL/SQL » split partition table
split partition table [message #243555] Thu, 07 June 2007 13:37 Go to next message
joau_hk
Messages: 4
Registered: May 2007
Junior Member
I have a partition table partition range by 2 columns (X, Y),
I need to split the partition, should the syntax be:

alter table ptable
split partition sptable
at ((200, 'XYZ'),
(400, 'ABC'))
into
( sptable1, sptable2)

Thanks.
Re: split partition table [message #243558 is a reply to message #243555] Thu, 07 June 2007 13:55 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
yes


ALTER TABLE mytab SPLIT PARTITION 
      part_1 at (100) INTO ( PARTITION
      p_part_1 ..., PARTITION part_1_p1 ...);



after that rebuild indexes.


ALTER INDEX index1 REBUILD PARTITION part_1_p1;
ALTER INDEX index2 REBUILD PARTITION part_1_p2;
ALTER INDEX index3 REBUILD PARTITION part_1_p3;
ALTER INDEX index4 REBUILD PARTITION part_1_p4;

[Updated on: Thu, 07 June 2007 13:58]

Report message to a moderator

Re: split partition table [message #243559 is a reply to message #243558] Thu, 07 June 2007 13:57 Go to previous messageGo to next message
joau_hk
Messages: 4
Registered: May 2007
Junior Member
Hi DreamZz,

but my partition table is partition by 2 columns, not just 1.
Re: split partition table [message #243561 is a reply to message #243559] Thu, 07 June 2007 14:02 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
I am not sure about mulitiple columns you can test it on your test server.
Re: split partition table [message #243564 is a reply to message #243555] Thu, 07 June 2007 14:09 Go to previous message
Michel Cadot
Messages: 64107
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What is the statement you used to create the table?
What is your Oracle version?

Regards
Michel
Previous Topic: Pl/SQL Query
Next Topic: SQL tuning document or hints if available ...
Goto Forum:
  


Current Time: Mon Dec 05 04:46:33 CST 2016

Total time taken to generate the page: 0.07017 seconds