Kbase P172706: 4GL/ABL: Slow performance of Dynamic Query with BREAK option
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  9/7/2010 |
|
Status: Unverified
SYMPTOM(s):
4GL/ABL: Slow performance of Dynamic Query with BREAK option
Dynamic Query with the BREAK option takes about seven times longer to execute over a remote database server TCP connection
Dynamic Query with the BREAK BY option for an indexed field takes about seven times longer to execute over a remote database server TCP connection than the same query using only BY.
FACT(s) (Environment):
Static FOR EACH statement performance WITH the BREAK option approximates its performance WITHOUT the with the BREAK option.
All Supported Operating Systems
OpenEdge 10.1C
OpenEdge 10.2x
OpenEdge Category: Language (4GL/ABL)
CAUSE:
This is expected behavior. The BREAK BY in a dynamic query always forces a sort. In the FOR EACH case it does not. In addition, the static FOR EACH has many BREAK optimizations due to the static predictable nature of the forward-only FOR EACH that cannot be done for a dynamic query.
FIX:
If the GET PREV, GET LAST, REPOSITION, or BROWSE methods or statements don't need to be associated with the query, and the query does not use the PRESELECT or a SORT phrases, then setting the query's FORWARD-ONLY attribute to TRUE will dramatically improves the dynamic query's performance when using the BREAK BY option.
Do not use the BREAK option with 4GL/ABL Dynamic Queries when the performance of such queries is not acceptable.