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: Partitioning question

Re: Partitioning question

From: Svend Jensen <Master_at_OracleCare.Com>
Date: Wed, 13 Feb 2002 18:56:21 +0100
Message-ID: <3C6AA8C5.1010807@OracleCare.Com>


Dimitry Vargalyuk wrote:

> I have db schema as following:
>
> CREATE TABLE EVENTS (
> ID NUMBER (14) NOT NULL,
> EVENTTIME DATE NOT NULL,
> ... blah blah ...
> CONSTRAINT EVENTS_PK
> PRIMARY KEY ( ID ) ) ;
>
> CREATE TABLE CHARGES (
> EVENT NUMBER (14) NOT NULL,
> ... blah blah ...
> ) ;
>
> ALTER TABLE CHARGES ADD CONSTRAINT CHARGES_EVENT_ID
> FOREIGN KEY (EVENT)
> REFERENCES EVENTS (ID) ;
>
> I want to create range partitions on EVENTS table on EVENTTIME column.
> Each partition will contain data for one month.
> Also I need the same partitioning on CHARGES table. Should I copy
> EVENTTIME column to CHARGES table or there are another ways?
>
> Best regards,
> Dimitry.
>
>
>

Hi Dimitry
Partition by range works only on a column that is actualy threre. Copying the eventtime to charges, will give you the posibility of having equal range partitioning on both tables. But that might destroy the posibility of a many to one relation between the tables.

/Svend Jensen Received on Wed Feb 13 2002 - 11:56:21 CST

Original text of this message

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