월별로 데이타가 들어가는 테이블이예요.
create table table_a
( show_date varchar2(8) not null,
seq_no varchar2(3) not null,
ban_no varchar2(2) not null
student_no number(3,0)
)
partition by range(show_date)
(
partition table_a_200501 value less than( '20050201' )
partition table_a_200502 value less than( '20050301' )
partition table_a_200503 value less than( '20050401' )
그리고 index 를 다음과 같이 만들었어요
create index pk_table_a on table_a ( show_date, seq_no, ban_no )
tablespace a local;
alter table table_a add ( show_date, seq_no, ban_no );
create index ix_table_a_01 on table_a ( show_date ) tablespace a
local;
create index ix_table_a_02 on table_a ( show_date, seq_no )
tablespace a local;
create index ix_table_a_03 on table_a ( show_date, ban_no )
tablespace a local;
이렇게 총 4개의 index 를 만들었어요.
근데 나중에 생성구조를 보니..
모두 nonunique 더라고요...
pk_table_a 이 인덱스만 unique 로 만들수는 없나요?
그리고...
인덱스 만들때 뒤에 붙는 local 은 무슨 뜻인가요?
|