Try OpenEdge Now
skip to main content
DataServer for Microsoft SQL Server
Initial Programming Considerations : Database design issues : Indexes and sorting : USE-INDEX and BY clause considerations
 
USE-INDEX and BY clause considerations
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.