Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Partitioning question
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