USE-INDEX and BY clause considerations
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
The BY clause offers greater programming flexibility
than the USE-INDEX clause, and should be used in
most cases. If indexes are added or deleted, applications coded
with the BY clause only require a recompile to
adjust to the index changes. Applications coded with the USE-INDEX clause require
code modifications to be current with the index changes. If the
index specified by a USE-INDEX clause is dropped,
the code will fail to compile until the code is modified. If there
is a more efficient index than the one specified in the USE-INDEX clause,
it will not be selected by ABL and it is unlikely to be used in
the data source's query plan.