here's one for the partitioning gurus out there....

I have an INVOICE table that I want to partition for performance and
purging. The way I want to partition it is to do range partitioning on the
INVOICE_STATE column, then sub-partition some of the partitions by
UPDATE_DATE. 

The logic behind this is:
1)      An invoice may be in sent, but unpaid ("A") state for several
months.
2)      We never want to purge off unpaid invoices
3)      After an invoice has been in paid ("P") state for 6 months, we want
to purge the invoice

My basic idea was to have partition-movement enabled and to use a
partitioning scheme like the following:
TABLE invoice (
        invoice_id, invoice_state, update_date, ...
) partition by range (invoice_state) (
    partition inv_act values less than 'B'
   ,partition inv_hist values less than 'R'
        subpartition by range (update_date) 
                ....
);

Alas, you can only subpartition by HASH (or LIST in 9iR2) The only solution
I can come up with is a 2 table solution -- keeping the unpaid invoices in
one table and the paid invoices in another table that is range partitioned
on UPDATE_DATE. The difficulties with this solution are coding the row
movements (bi-directional) and having to code a partition-view.

Any suggestions would be helpful.

Kevin Toepke
[EMAIL PROTECTED]
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------
The information in this electronic mail message is Trilegiant Confidential
and may be legally privileged. It is intended solely for the addressee(s).
Access to this Internet electronic mail message by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or action taken or omitted to be taken in reliance on
it is prohibited and may be unlawful.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------
The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message and
its attachments could have been infected during transmission. By reading the
message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. Trilegiant Corporation is not liable for any loss or damage
arising in any way from this message or its attachments.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Toepke, Kevin M
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to