Path: news.easynews.com!easynews!news.he.net!news-hog.berkeley.edu!ucberkeley!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!jlcomp.demon.co.uk!not-for-mail
From: "Jonathan Lewis" <jonathan@jlcomp.demon.co.uk>
Newsgroups: comp.databases.oracle.server
Subject: Re: Partitioning question
Date: Thu, 6 Jun 2002 10:17:18 +0100
Message-ID: <1023354993.28508.0.nnrp-01.9e984b29@news.demon.co.uk>
References: <e42147c6.0206050000.188570e0@posting.google.com> <3CFEEBC7.747EDE31@exesolutions.com>
NNTP-Posting-Host: jlcomp.demon.co.uk
X-NNTP-Posting-Host: jlcomp.demon.co.uk:158.152.75.41
X-Trace: news.demon.co.uk 1023354993 nnrp-01:28508 NO-IDENT jlcomp.demon.co.uk:158.152.75.41
X-Complaints-To: abuse@demon.net
X-Newsreader: Microsoft Outlook Express 4.72.3110.5
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Lines: 77
Xref: easynews comp.databases.oracle.server:149717
X-Received-Date: Thu, 06 Jun 2002 04:06:27 MST (news.easynews.com)


I agree with Daniel.

If you are loading one day per day, then the obvious
strategy for administrative reasons is one partition
to one day.

You don't mention the version of Oracle, though, and
this may affect the way in which you can query
the data efficiently.  Oracle's example of weekly partitions
may be based on a need to minimise the cost of partition
probing on the occasions when partition elimination cannot
take place.

366 partitions is not a lot - although you have to multiply
this up by the number of indexes plus one to calculate the
real impact of (e.g.) dropping a partition.  However, if you
run queries where Oracle cannot see at parse/bind time
that a specific, minimal, set of partitions is needed, than
you will visit every partition.  In some cases, and especially
if you have rigged your indexes to address this particular
issue, the cost of this probing will be relatively small;
nevertheless, 365 redundant probes could be significantly
more expensive than the basic cost of the query.

So - whatever you choose to do - find out the structure
of the important queries, and check how effectively
Oracle can do partition elimination for those queries,
and how expensive it is when partition elimination does
not take place.



--
Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminars
        UK            June / July
        Australia      July / August
http://www.jlcomp.demon.co.uk/seminar.html

Daniel Morgan wrote in message <3CFEEBC7.747EDE31@exesolutions.com>...
>SerGioGio wrote:
>
>> Hi !!
>>
>> A little question about Oracle's partitioning system...
>>
>> We have to load on one table about 500,000 rows each day, that is to
>> say approximately 2 GB.
>> We want also to perform a "rolling window" mechanism : we keep rows
>> until they become 1 year old, and then we want to delete them. So, in
>> the table, at any given time, there are only 365 days of loaded rows.
>> It looks a lot to me like a classical requirement ;)
>>
>> We are thinking of using one partition per day, but we are not aware
>> of the drawbacks. Oracle documentation says it would speed up process
>> (for exemple when deleting the 366 days old rows), but they also give
>> an example where they would not use a partition per day in a daily
>> load scenario but instead a partition per week (and then, update the
>> partition every day). It looks a bit more difficult to set up. They
>> are not very clear about why we shouldn't use one partition per day,
>> so I would like to know what are your opinions about that ?
>>
>> Thanks in advance !!
>>
>> SerGioGio
>
>My personal preference would be a partition per day I my intention was
>to have a one day floating window. Partition by week if I was going to
>have a one week window.
>
>Daniel Morgan
>


