Kbase P154584: What types of locks are used when performing an update table statistics for a specific table?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/6/2009 |
|
Status: Verified
GOAL:
What types of locks are used when performing an update table statistics for a specific table?
GOAL:
What types of locks are used when performing an update index statistics for a specific table?
FACT(s) (Environment):
All Supported Operating Systems
Progress 9.1D
Progress 9.1E
OpenEdge 10.x
FIX:
As of 9.1D, UPDATE STATISTICS does not lock user data. Rather, it only locks the output statistics rows (and also acquires a shared lock on the schema). This means that user level transactions can freely run concurrently with UPDATE STATISTICS.
All application table data and indexes are read no-lock. Records written to the SQL statistics tables (such as pub._sysidxstat) are
written with EXCLUSIVE locks.
In recent versions of OpenEdge SQL, 10.2A+ some improvements were made so that the scope of the transaction for writing the statistics is smaller. As of 10.2A, all the writes to the statistics tables are postponed until the end of statement execution, and then all new stats rows are written at once.