Crea la tabella con il partizionamento a intervalli:
CREATE TABLE TEJAS_CARD_REPORT
(
"INSERT_DATETIME" TIMESTAMP (6) NOT NULL ENABLE,
"NAME" VARCHAR2(100 BYTE),
"IPADDRESS" VARCHAR2(100 BYTE),
"PRODUCTCODE" VARCHAR2(100 BYTE),
"LCTNAME" VARCHAR2(100 BYTE),
"CARDTYPELABEL" VARCHAR2(100 BYTE),
"SOFTWAREVERSION" VARCHAR2(100 BYTE)
) partition by range(insert_datetime) interval (interval '15' minute)
(
partition initial_partition values less than (date '2000-01-01')
);
Le partizioni vengono create dinamicamente quando i dati vengono inseriti.
insert into tejas_card_report(insert_datetime) values (timestamp '2000-01-01 00:14:00');
insert into tejas_card_report(insert_datetime) values (timestamp '2000-01-01 00:29:00');
insert into tejas_card_report(insert_datetime) values (timestamp '2000-10-11 00:00:00');
SQL> select partition_name, high_value from dba_tab_partitions where table_name = 'TEJAS_CARD_REPORT';
PARTITION_NAME HIGH_VALUE
-------------------- --------------------------------------------------------------------------------
SYS_P21516 TIMESTAMP' 2000-10-11 00:15:00'
SYS_P21515 TIMESTAMP' 2000-01-01 00:30:00'
SYS_P21514 TIMESTAMP' 2000-01-01 00:15:00'
INITIAL_PARTITION TIMESTAMP' 2000-01-01 00:00:00'
In una nota non correlata, evita TABLESPACE "SYSTEM"
. Non vuoi quasi mai archiviare dati di utenti o applicazioni nel tablespace SYSTEM.