You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -235,6 +235,19 @@ LAQ is disabled for the database if the percentage of the potentially wasted wor
235
235
236
236
If the wasted work and the number of restarted statements fall below their respective thresholds, LAQ is re-enabled for the database.
237
237
238
+
#### LAQ limitations
239
+
240
+
Lock after qualification might not be used in the following scenarios:
241
+
242
+
- When disabled by [LAQ heuristics](#laq-heuristics).
243
+
- When conflicting locking hints, such as `UPDLOCK`, `READCOMMITTEDLOCK`, `XLOCK`, or `HOLDLOCK` are used.
244
+
- When the transaction isolation level is other than `READ COMMITTED`, or when the `READ_COMMITTED_SNAPSHOT` database option is disabled.
245
+
- When the table being modified has a columnstore index.
246
+
- When the DML statement includes variable assignment.
247
+
- When the DML statement has an `OUTPUT` clause.
248
+
- When the DML statement uses more than one index seek or scan operator to read the rows being modified.
249
+
- In `MERGE` statements.
250
+
238
251
### <aid="behavior"></a> Query behavior changes with optimized locking and RCSI
239
252
240
253
Concurrent workloads under read committed snapshot isolation (RCSI) that rely on strict execution order of transactions might experience differences in query behavior when optimized locking is enabled.
@@ -304,7 +317,7 @@ The following improvements help you monitor and troubleshoot blocking and deadlo
304
317
- Under each resource in the deadlock report `<resource-list>`, each `<xactlock>` element reports the underlying resources and specific information for locks of each member of a deadlock. For more information and an example, see [Optimized locking and deadlocks](../sql-server-deadlocks-guide.md#optimized-locking-and-deadlocks).
305
318
- Extended events
306
319
- The `lock_after_qual_stmt_abort` event fires when a statement is internally aborted and restarted because of a conflict with another transaction. For more information, see [Lock after qualification (LAQ)](#lock-after-qualification-laq).
307
-
- In [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)], the `locking_stats` event fires for every database every several minutes and provides aggregate locking statistics for the time interval, such as the number of lock escalations, whether TID locking and LAQ components of optimized locking are enabled, and the number of queries that were ineligible for LAQ for various reasons. This event fires even if optimized locking is disabled.
320
+
- In [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)], the `locking_stats` event fires for every database every several minutes and provides aggregate locking statistics for the time interval, such as the number of lock escalations, whether TID locking and LAQ components of optimized locking are enabled, and the number of queries where LAQ wasn't used for various reasons. This event fires even if optimized locking is disabled.
0 commit comments