Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Partitioning Quandry
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 wantto 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
ktoepke_at_trilegiant.com
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Toepke, Kevin M INET: ktoepke_at_trilegiant.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing ListsReceived on Tue Apr 30 2002 - 10:03:43 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (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).
![]() |
![]() |