Създайте таблицата с интервално разделяне:
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')
);
Дяловете се създават динамично при вмъкване на данни.
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'
При несвързана бележка избягвайте TABLESPACE "SYSTEM"
. Почти никога не искате да съхранявате потребителски или приложни данни в табличното пространство SYSTEM.