Optimistic Concurrency Control and Pessimistic Concurrency Control in Dynamics AX Occ enabled

Optimistic Concurrency Control (OCC) helps increase database performance. Pessimistic Concurrency Control locks records as soon as they are fetched from the database for an update. However, Optimistic Concurrency only locks records from the time when the actual update is performed.

Following are the advantages of using OCC:

  • Fewer resources are used to hold the locks during the update process.
  • Records are locked for a shorter length of time.
  • Records remain available for other processes to update if they have been selected from the database but haven’t yet been updated.

The disadvantage of using OCC is that the update can fail if another process updates the same record. If the update fails, it must be retried. This can lead to a reduction in database performance.

EX :  while select optimesticlocks table


OCC:

Optimistic Concurrency Control (OCC) helps increase database performance
Optimistic Concurrency only locks records from the time when the actual update is performed.

PCC

Pessimistic Concurrency Control locks records as soon as they are fetched from the database for an update.

OCC Enabled: Yes

Comments