Re: How to Partition an existing table
- From: "P M Adil" <parvezmadil@xxxxxxxxx>
- To: ora-apps-dba@xxxxxxxxxxxxx
- Date: Sat, 29 Nov 2008 13:57:37 -0600
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.<http://in.rd.yahoo.com/tagline_messenger_1/*http://in.messenger.yahoo.com/?wm=n/>
>
>
Other related posts: