Kbase P85291: Reposition to RowId a specific dynamic query is slower than a similar static query
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/10/2008 |
|
Status: Unverified
SYMPTOM(s):
Reposition to RowId a specific dynamic query is slower than a similar static query
The query string is the same for both queries
The static query reposition all the time on the same record, no matters what ROWID is used in the REPOSITION to ROWID statement.
CAUSE:
The REPOSITION statement fails with no-error message for static query which give the impression that static query is faster repositioned than the similar dynamic query.
REPOSITION statement works only for SCROLLING queries, or queries which are associated with a browse widget.
In this example the static query is defined without SCROLLING and the REPOSITION statement is using NO-ERROR which will suppress the error message.
FIX:
Define the static query as SCROLLING and the static query will not fail anymore. So the performance between dynamic and the static query will be similar:
The static query reposition example will be like:
DEFINE QUERY MyQuery FOR customer SCROLLING.
OPEN QUERY MyQuery FOR EACH customer NO-LOCK.
REPOSITION MyQuery TO ROWID ROWID(bcust) NO-ERROR.