You are on page 1of 7

-- Create table

create table ACT_HI_ACTINST


(
ID_ NVARCHAR2(64) not null,
PROC_DEF_ID_ NVARCHAR2(64) not null,
PROC_INST_ID_ NVARCHAR2(64) not null,
EXECUTION_ID_ NVARCHAR2(64) not null,
EXECUTION_PATH_ NVARCHAR2(512),
ACT_ID_ NVARCHAR2(255) not null,
ACT_NAME_ NVARCHAR2(255),
ACT_TYPE_ NVARCHAR2(255) not null,
ASSIGNEE_ NVARCHAR2(64),
START_TIME_ TIMESTAMP(6) not null,
END_TIME_ TIMESTAMP(6),
DURATION_ NUMBER(19),
PART_ID NUMBER(6) default TO_NUMBER(TO_CHAR(SYSDATE,'DD')) not null
)
partition by list (PART_ID)
(
partition P1 values (1)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P2 values (2)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P3 values (3)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P4 values (4)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P5 values (5)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P6 values (6)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P7 values (7)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P8 values (8)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P9 values (9)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P10 values (10)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P11 values (11)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P12 values (12)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P13 values (13)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P14 values (14)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P15 values (15)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P16 values (16)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P17 values (17)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P18 values (18)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P19 values (19)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P20 values (20)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P21 values (21)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P22 values (22)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P23 values (23)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P24 values (24)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P25 values (25)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P26 values (26)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P27 values (27)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P28 values (28)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P29 values (29)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P30 values (30)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
),
partition P31 values (31)
tablespace TAB_CC
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 8M
next 1M
minextents 1
maxextents unlimited
)
);
-- Create/Recreate indexes
create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST (END_TIME_);
create index ACT_IDX_HI_ACT_INST_EXECUTION on ACT_HI_ACTINST (EXECUTION_ID_,
ACT_ID_);
create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST (START_TIME_);
create index IDX_ACT_HI_ACTINST_ID_PART on ACT_HI_ACTINST (ID_);
create index IDX_ACT_HI_ACTINST_PROCINST_ID on ACT_HI_ACTINST (PROC_INST_ID_,
ACT_ID_);

You might also like