Try OpenEdge Now
skip to main content
ABL Database Triggers and Indexes
Database Index Usage : How ABL chooses and brackets indexes to satisfy queries : Case 1: WHERE searchExpr
 

Case 1: WHERE searchExpr

If there is an index on the field in searchExpr, or if field is the first component in a multi-field index, ABL uses the index. Otherwise, ABL uses the primary index:
Sample WHERE clause
Indexes used
WHERE Customer.Name BEGINS "B"
Name
WHERE Customer.Postal-Code BEGINS "01"
Cust-Num (primary)
If the searchExpr references a word-indexed field, ABL uses the word index.
If there is a BYfield clause, and field is indexed, ABL uses the index to sort returned records as long as there is no index on the WHERE clause. If field is not indexed, ABL creates a temporary sort table and sorts the records at run time.