In Progress 9.1D05, a new query attribute
FORWARD-ONLY and a new startup option, '
-noautoreslist', to improve the performance of dynamic and static queries that do not require a result-list. For example queries that do not require the ability to invoke the
GET PREV function.
Queries that have the possibility to be navigated backwards and repositioned to specific records, need to maintain a result list which will be stored sorted in the srt file on disk if it cannot fit in memory. The size of the result list is related to the number of records that match query criteria. Avoiding the result-list improves the performance of the query and minimizes .srt file disk space usage.
- The '-noautoreslist' startup parameter allows static NON-SCROLLING queries to avoid building result-lists.
- The FORWARD-ONLY query attribute allows the query to avoid a result-list whether static or dynamic.
FORWARD-ONLY Query AttributeReturn Type : Logical
Applies To : Query handle
Syntax: <query handle>:FORWARD-ONLY [=logical-expression]
The FORWARD-ONLY query attribute is a READ/WRITE attribute:
When FORWARD-ONLY is set to TRUE:
- Motion is restricted to forward only in the query which negates having to build a result-list.
- As the QUERY does not build a result-list (srt file), any GET-PREV, GET-LAST, REPOSITION function or BROWSE will error.
- FORWARD-ONLY cannot be set while the query is open or being browsed.
If FORWARD-ONLY is set to false (default):
- The QUERY automatically builds a result-list
- The QUERY will allow any prev/last/first/reposition facilitated by having a result-list.
-noautoreslist Startup ParameterThe -noautoreslist startup parameter changes the behavior of STATIC, non-scrolling queries only. A static non-scrolling query is one that:
- Comes into being with a DEFINE QUERY or OPEN QUERY statement
- Has no SCROLLING keyword on its DEFINE statement (or had no DEFINE statement)
- Has not been implicitly changed into SCROLLING by being part of a DEFINE BROWSE in the same compilation unit
When -noautoreslist is used, these queries will no longer automatically build result-lists and the following cannot be used in the QUERY:
- GET-PREV method or GET PREV statement
- GET-LAST method or GET LAST statement
- REPOSITION methods or REPOSITION statement
- GET-FIRST method or GET FIRST statement from the middle of the query
- QUERY-PREPARE method or OPEN statement with CONTAINS or multiple-index scanning
- BROWSE
Opening static non-scrolling queries for sort/pre-selection when using noautoreslist, will still cause a result-list to be created, because there is no other way to resolve the query.