가 상당히 큰 postgres 테이블과 함께 몇 가지 억의 행이 있습니다.
그러나 테이블 분할할 수 있습 중 하나에 의해 열이(type
)
우리가 선호:
인덱스를 가진 두 개의 열이
create nonclustered index ix_index1 on table1(type, string_urn_id)
또는 조건부 인덱스
create nonclustered index ix_index1_alternative on table1(string_urn_id) WHERE type = 'type1'
create nonclustered index ix_index1_alternative2 on table1(string_urn_id) WHERE type = 'type2'
create nonclustered index ix_index1_alternative3 on table1(string_urn_id) WHERE type = 'type3'
....