मैं एक शालीनता से बड़ी 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'
....