Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: partitioning
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C2EE51.0FC58600
Content-Type: text/plain;
charset="iso-8859-1"
You could accomplish this with a before insert trigger and a partitioning
column that contains the value 0 through 7.
e.g.
create trigger
before insert
for each row
begin
select mod (sequence.nextval, 8) into :new.partition_column
from dual ;
end ;
/
Something similar would be achieve by hash partitioning, which is easier to implement.
> -----Original Message----- > From: Basavaraja, Ravindra [mailto:Ravindra.Basavaraja_at_T-Mobile.com] > > I am wondering if there is any way to achieve horizontal > partitioning in Oracle. > > Assuming that I have about 8 partitions for a table.When > there is INSERT onto this table I want one record > to be inserted into each partition i.e > 1st record goes into partition 1 > 2nd record goes into partition 2 > 3rd record goes into partition 3 > ..... > ..... > 8th record goes into partition 8 > 9th record goes into partition 1. > > I guess this feature is available in Informix handled by The > informix engine.I am not sure if Oracle has something > similiar to this OR is it possible to design a logic and > embede it ,but what would be the performance effect? > > Any thoughts or similiar ideas
------_=_NextPart_001_01C2EE51.0FC58600
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.45">
<TITLE>RE: partitioning</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>You could accomplish this with a before insert =
trigger and a partitioning column that contains the value 0 through =
7.</FONT>
<BR><FONT SIZE=3D2>e.g.</FONT>
<BR><FONT SIZE=3D2>create trigger</FONT>
<BR><FONT SIZE=3D2>before insert</FONT>
<BR><FONT SIZE=3D2>for each row</FONT>
<BR><FONT SIZE=3D2>begin</FONT>
<BR><FONT SIZE=3D2> select mod (sequence.nextval, 8) into =
:new.partition_column</FONT>
<BR><FONT SIZE=3D2> from dual ;</FONT>
<BR><FONT SIZE=3D2>end ;</FONT>
<BR><FONT SIZE=3D2>/</FONT>
</P>
<P><FONT SIZE=3D2>Something similar would be achieve by hash =
partitioning, which is easier to implement.</FONT>
</P>
<P><FONT SIZE=3D2>> -----Original Message-----</FONT>
<BR><FONT SIZE=3D2>> From: Basavaraja, Ravindra [<A =
HREF=3D"mailto:Ravindra.Basavaraja_at_T-Mobile.com">mailto:Ravindra.Basavar=
aja_at_T-Mobile.com</A>]</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> I am wondering if there is any way to achieve =
horizontal </FONT>
<BR><FONT SIZE=3D2>> partitioning in Oracle.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Assuming that I have about 8 partitions for a =
table.When </FONT>
<BR><FONT SIZE=3D2>> there is INSERT onto this table I want one =
record </FONT>
<BR><FONT SIZE=3D2>> to be inserted into each partition i.e </FONT>
<BR><FONT SIZE=3D2>> 1st record goes into partition 1</FONT>
<BR><FONT SIZE=3D2>> 2nd record goes into partition 2</FONT>
<BR><FONT SIZE=3D2>> 3rd record goes into partition 3</FONT>
<BR><FONT SIZE=3D2>> .....</FONT>
<BR><FONT SIZE=3D2>> .....</FONT>
<BR><FONT SIZE=3D2>> 8th record goes into partition 8 </FONT>
<BR><FONT SIZE=3D2>> 9th record goes into partition 1.</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> I guess this feature is available in Informix =
handled by The </FONT>
<BR><FONT SIZE=3D2>> informix engine.I am not sure if Oracle has =
something</FONT>
<BR><FONT SIZE=3D2>> similiar to this OR is it possible to design a =
logic and </FONT>
<BR><FONT SIZE=3D2>> embede it ,but what would be the performance =
effect?</FONT>
<BR><FONT SIZE=3D2>> </FONT>
<BR><FONT SIZE=3D2>> Any thoughts or similiar ideas</FONT>
Received on Wed Mar 19 2003 - 13:52:24 CST
![]() |
![]() |