Kbase P52812: Poor performance when reading the _Lock table
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  2/3/2009 |
|
Status: Verified
SYMPTOM(s):
Poor performance when reading the _Lock table
Trying to determine what user has a record locked for too long
FACT(s) (Environment):
Progress 9.x
All Supported Operating Systems
OpenEdge 10.x
OpenEdge Category: Language (4GL/ABL)
CAUSE:
The _Lock table is not indexed (for database performance reasons) so any query against it will require a table scan of all the _Lock records
FIX:
Use code similar to the following to avoid scanning unused _Lock entries:
FOR EACH _Lock NO-LOCK:
IF _Lock._Lock-Usr = ? THEN
LEAVE.
/* Do your processing here */
END.