RE: How to Partition an existing table
- From: Fadi Hasweh <fhasweh@xxxxxxxxxxx>
- To: <ora-apps-dba@xxxxxxxxxxxxx>
- Date: Sun, 30 Nov 2008 19:46:30 +0000
also check
http://www.oracle-base.com/articles/misc/PartitioningAnExistingTable.php
fadi
Date: Sat, 29 Nov 2008 13:57:37 -0600From: parvezmadil@xxxxxxxxxxx:
ora-apps-dba@xxxxxxxxxxxxxxxxxxxx: Re: How to Partition an existing table
There are 3 steps involved to achive it as follows:
1. analyze your data in the existing table and decide which type of partition
is suitable to your data. if your table has 5 years of data in it then create
a partition table containing 5 paritions (part_year96, part_year97,
part_year98, part_year99, part_year2000) based on range partitioning -- on
yearly basis. 2. load the data in each respective partion as follows:
insert into table customer partition part_year96
select * from customer where year='1996';
commit;
insert into table customer partition part_year97
select * from customer where year='1997';
commit;
insert into table customer partition part_year98
select * from customer where year='1998';
commit;
insert into table customer partition part_year99
select * from customer where year='1999';
commit;
insert into table customer partition part_year2000
select * from customer where year='2000';
commit;
3. drop table customer;
if required, create partition indexes on all the partition.
Have fun.
On Wed, Nov 26, 2008 at 11:22 PM, khabeer khayyam <khabeer1983@xxxxxxxxx> wrote:
Can anybody plz tell me how to partition an existing table.
Thanks,
Regards,
Khayyam
Connect with friends all over the world. Get Yahoo! India Messenger.
_________________________________________________________________
Explore the seven wonders of the world
http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE
Other related posts: