Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: need advice for partitioning in 8.1.7.2

Re: need advice for partitioning in 8.1.7.2

From: Ragnar Hark <ragnar.hark_at_mail.ee>
Date: Wed, 2 Apr 2003 11:36:01 +0300
Message-ID: <b6e7dd$49a$1@kadri.ut.ee>


Thank You

"Saikat Chakraborty" <saikatchak_at_hotmail.com> wrote in message news:be1b756931a9ddd9b504abb1a21e8207.16981_at_mygate.mailgate.org...
> >
> > What is the best method to migrate existing table to partitioned table?
>
> Hi,
> First you decide on a partitioning key. It should be used in most
> of your queries to help partition prunning.
> If it a date field and you partition by month, then you create
> partitions for each month.
> You may also combine different months data in a partition.
> Let us assume that the table is like
>
> create table emp
> (
> empno numebr(10),
> hierdate date
> )
>
> you decide to partition on hierdate. So you create another table
> "emp_part" of the same structure but partitoned.
> Then you insert records in the emp_part table. You should not build
> any indexes on emp_part before the data insertion. For system
> resource you may want to use multiple insert statements (may be
> for each month). After the data is inserted, you drop the table emp.
> And rename the table "emp_part" to "emp". Then you create any indexes
> that are previously there.
> I feel this is the best method. There are also some other method like
> export-recreate partitoned table-import. But the method I said is
> the faster one. The only problem being at one point of time there will
> the same data in two tables and that means twice the space is needed.
> Thanks,
> Saikat Chakraborty
> http://saikatchak.tripod.com
>
>
> --
> Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Received on Wed Apr 02 2003 - 02:36:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US