Consultor Eletrônico



Kbase P55316: Using multi-component indexes
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   11/20/2003
Status: Unverified

GOAL:

Using multi-component indexes

FIX:

You can define an index on one or more fields in a table. Defining a multi-component index can be much more effective than defining multiple indexes on the same individual fields, but only when your application needs to access that combination of fields in the order in which they appear in the index. For example, if your application sometimes need to select data based on the value of field A, and sometimes on A and B together, and sometimes on A, B, and C, then it makes good sense to define a multi-component index with fields A, B, and C in that order.

However, if your application sometimes needs to select data based just on field B, or on C, or on B and C together, without knowing the value of A, then this index will do you no good whatsoever in those cases, any more than you can easily locate a word in the dictionary by knowing the second or third letter in the word.

Always evaluate the selection requirements of your application carefully as you design your database indexes.