Consultor Eletrônico



Kbase P118506: SDO Query is very slow to open in Dynamics
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   06/09/2006
Status: Unverified

FACT(s) (Environment):

Dynamics

SYMPTOM(s):

SDO Query is very slow to open in Dynamics

The dynamics General Manager getRecordUserProps function is very slow reading comments records.

SDO query is very slow to open but the same 4GL query is fast.

SDO query takes 20 or 30 seconds to open.

CAUSE:

With many comments records this becomes a problem when the SDO query is opened because the getRecordUserProps function reads records based on owning_entity_mnemonic and the owning_obj. For example:


/* Now build the list of auto comments */
IF lRowCommentExist AND LOOKUP('AutoComment':U,pcEntityFields) > 0
THEN DO:
IF lTableHasObjField THEN
FOR EACH gsm_comment NO-LOCK
WHERE gsm_comment.owning_entity_mnemonic = pcEntityMnemonic
AND gsm_comment.owning_obj = DECIMAL(pcEntityObjValue)
AND gsm_comment.auto_display = YES
AND (gsm_comment.expiry_date >= TODAY
OR gsm_comment.expiry_date = ?):
ASSIGN cRowCommentAuto = cRowCommentAuto
+ (IF cRowCommentAuto = '':U THEN '':U ELSE CHR(10))
+ gsm_comment.comment_description.
END.
ELSE
FOR EACH gsm_comment NO-LOCK
WHERE gsm_comment.owning_entity_mnemonic = pcEntityMnemonic
AND gsm_comment.owning_reference = pcEntityObjValue
AND gsm_comment.auto_display = YES
AND (gsm_comment.expiry_date >= TODAY
OR gsm_comment.expiry_date = ?):
ASSIGN cRowCommentAuto = cRowCommentAuto
+ (IF cRowCommentAuto = '':U THEN '':U ELSE CHR(10))
+ gsm_comment.comment_description.
END.
END.However, there isn't an indexed defined in the ICFDB based on owning_entity_mnemonic and owning_obj.

FIX:

Upgrade to OpenEdge 10.1A01 or later. The code in the function has been modified to use an index based on the owning_entity_mnemonic and owning_reference fields.