normally, create a SI on PI will cause a error:
create table tbl1
( col1 char(10),
col2 char(10),
col3 char(10)
)
primary index(col1, col2)
index(col1,col2)
CREATE TABLE Failed. 3519: Two indexes with the same columns.
here is some special circumstances:
create table tbl1
( col1 char(10),
col2 DATE
)
primary index(col1)
PARTITION BY RANGE_N(col2 BETWEEN DATE '2000-01-01' AND DATE '2020-12-31' EACH INTERVAL '1' DAY)
unique index(col1)
the reason is performance.
No comments:
Post a Comment