Case 1: WHERE searchExpr
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
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.