here is an example of how to do this on Oracle 11g and it works very well. I have not tried this on Oracle 10g, you can try.
Here's how to create a table with daily sections:
CREATE TABLE XXX ( partition_date DATE, ..., ..., ) PARTITION BY RANGE (partition_date) INTERVAL (NUMTODSINTERVAL(1, 'day')) ( PARTITION part_01 values LESS THAN (TO_DATE('2000-01-01','YYYY-MM-DD')) ) TABLESPACE MY_TABLESPACE NOLOGGING;
As you see above, Oracle will automatically create separate partitions for each individual_day partition after January 1, 2000. Entries whose partition_size is older than this date will be stored in the "part_01" section.
You can track table sections with this statement:
SELECT * FROM user_tab_partitions WHERE table_name = 'XXX';
Then, when you want to delete some partitions, use the following command:
ALTER TABLE XXX DROP PARTITION AAAAAA UPDATE GLOBAL INDEXES
where "AAAAAA" is the name of the parry.
Hope this helps you!
source share