Query Result Order: the PRGRS_ALWAYS_INDEX option
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Some queries can gain a performance advantage when the
result set from the query does not use an index to order the results.
In older versions of the DataServer for Microsoft SQL Server, results
sets were always indexed because queries and their results were
gathered in segments with new cursors being generated for each query
segment. However, most advanced drivers and data sources now allow
a single cursor to be retained for the life of a given query, even
across a transaction boundary. Drivers that can preserve cursors
are allowed to execute unindexed queries if the PRGRS_ALWAYS_INDEX option
is set to 0 (off). When this option is off and the user does not
specify an index or BY clause for the results of
their ABL statement and the particular ABL being executed does not
require scrolling capability in the OpenEdge client, the query
result will remain unindexed by the DataServer.
ORDER BY clause to the
data source. However, the DataServer has no control over whether
or not the actual data source utilizes an index in order to generate
a result set.