有这样一个分区表:
create table t_con
(
iid integer not null,
cid varchar2(100) not null,
tid integer not null,
mid integer default 0 not null,
gid integer not null,
tiid integer not null,
direction number(2) not null,
rt number not null,
amt number not null,
mdate timestamp not null,
status number(2) not null,
createdate timestamp not null,
sdate date not null,
prt number default 0 not null,
flag integer default 0 not null,
reason varchar2(500),
type integer default 1,
systemsource number(38),
stamt number,
rate number default 1 not null,
isadded integer default 0 not null,
isbuffer integer default 0 not null,
cur varchar2(20)
)
partition by range (mid)
(
partition p100 values less than (100),
partition p200 values less than (200),
partition p300 values less than (300),
......
)tablespace centre;
alter table t_con
add constraint pk_t_con primary key(iid, cid, mid)
using index tablespace centreidx local nologging;
create index ix_contract_gamingid on t_con(gid)
tablespace centreidx nologging;
create index ix_con_iid on t_con(iid, status)
tablespace centreidx nologging;
create index ix_con_tiid on t_con(tiid)
tablespace centreidx nologging;