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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Partitioning tables

Re: Partitioning tables

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Thu, 18 Nov 1999 18:51:58 +0800
Message-ID: <3833DA4E.26D1@yahoo.com>


Jenda Krynicky wrote:
>
> I have a huge table (OK, OK ... most of you have seen bigger ;-) and would like to partition it (I think it
> would help performance).
>
> One of the fields in the table is a "weeknumber" (not number within a year, but number of weeks
> since some date) and I think since all queries contain
>
> WHERE AGBWEEK >= whatever AND AGBWEEK <=something ...
>
> this would be the best field to partition the table on. Right?
>
> I thought I could create a partition for every N weeks.
>
> But we get new data every week so the upper bound - the maximum week number - changes.
>
> So ... what should I do?
> Should I "prealocate" several partitions for upcoming weeks?
> And then repartition the table after the last partition gets too big?
>
> Or is is possible to split the last partition when necessary ?
> Or instruct Oracle to create a new partition every time the partitioning field increases above a limit?
>
> Thanks and please forgive my misunderstandings. (I'm sure there are many.)
> Jenda
> http://Jenda.Krynicky.cz

There isn't as yet an "automatic" 'add partition as required' facility within oracle. A simple mechanism is to keep a couple of partitions "spare" to catch the new data as it occurs. Each week you can add a partition...user_tab_partitions contains the partitions, you can name the partitions the same as your week number (or look directly at the HIGH_VALUE column) so that you can build an automated script to add a new partition...

HTH
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Thu Nov 18 1999 - 04:51:58 CST

Original text of this message

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