Progress
Database Design
Guide
General Rules for Choosing a Single Index
When the selection criteria do not support multiple index usage, Progress uses these general rules (in this order) to select the most efficient index:
- If there is a CONTAINS clause (which is legal only for word indexed fields), use the word index:
- If an index is unique, and all of its components are used in active equality matches, use the unique index. It invariably returns 0 or 1 records:
- Use the index with the most active equality matches. Equality matches are active if:
- Use the index with the most active range matches. For a range match to be active it must stand alone or be connected to other selection criteria by ANDs. In addition, it must apply to an index component having any one of four properties:
- Use the index with the most sort matches. (All sort matches are active.)
- Use the index that comes first alphabetically. That is, if there is a tie—if multiple indexes have the same number of active equality, range, and/or sort matches—use the alphabet to decide:
- Use the primary index:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |