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
Copy file name to clipboardExpand all lines: azure-sql/managed-instance/doc-changes-updates-release-notes-whats-new.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ description: Learn about the new features and documentation improvements for Azu
5
5
author: MashaMSFT
6
6
ms.author: mathoma
7
7
ms.reviewer: wiassaf, mathoma
8
-
ms.date: 07/28/2025
8
+
ms.date: 07/29/2025
9
9
ms.service: azure-sql-managed-instance
10
10
ms.subservice: service-overview
11
11
ms.topic: whats-new
@@ -57,6 +57,7 @@ The following table lists features of Azure SQL Managed Instance that have been
57
57
58
58
| Feature | GA Month | Details |
59
59
| ---| --- |--- |
60
+
|[Optimized locking](/sql/relational-databases/performance/optimized-locking)| July 2025 | Azure SQL Managed Instance with the [Always-up-to-date](update-policy.md#always-up-to-date-update-policy) update policy now has optimized locking enabled for all user databases. |
60
61
|[UNISTR (Transact-SQL)](/sql/t-sql/functions/unistr-transact-sql)| July 2025 | Azure SQL Managed Instance now supports the `UNISTR` T-SQL syntax for Unicode string literals.|
61
62
|[\|\| (String concatenation)](/sql/t-sql/language-elements/string-concatenation-pipes-transact-sql?view=azuresqldb-current&preserve-view=true) and [\|\|= (Compound assignment)](/sql/t-sql/language-elements/compound-assignment-pipes-transact-sql?view=azuresqldb-current&preserve-view=true) syntax support | July 2025 |Azure SQL Managed Instance now supports [\|\| (String concatenation)](/sql/t-sql/language-elements/string-concatenation-pipes-transact-sql?view=azuresqldb-current&preserve-view=true) and [\|\|= (Compound assignment)](/sql/t-sql/language-elements/compound-assignment-pipes-transact-sql?view=azuresqldb-current&preserve-view=true) Transact-SQL syntax.|
62
63
|[Degrees of parallelism (DOP) feedback](/sql/relational-databases/performance/intelligent-query-processing-degree-parallelism-feedback?view=azuresqldb-mi-current&preserve-view=true)| July 2025| DOP feedback improves query performance by identifying parallelism inefficiencies for repeating queries, based on elapsed time and waits. For more information, see the [Smarter Parallelism: Degree of parallelism feedback in SQL Server 2025](https://techcommunity.microsoft.com/blog/sqlserver/smarter-parallelism-degree-of-parallelism-feedback-in-sql-server-2025/4431318) blog. |
This article introduces optimized locking, a database engine capability that offers an improved transaction locking mechanism to reduce lock memory consumption and blocking for concurrent transactions.
25
+
Optimized lockingoffers an improved transaction locking mechanism to reduce lock blocking and lock memory consumption for concurrent transactions.
26
26
27
27
## What is optimized locking?
28
28
@@ -49,15 +49,11 @@ The following table summarizes the availability and enabled state of optimized l
|[!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)]<sup>[2022](/azure/azure-sql/managed-instance/update-policy#sql-server-2022-update-policy)</sup>| No | N/A |
54
54
|[!INCLUDE [sssql25-md](../../includes/sssql25-md.md)]| Yes | No (can be enabled per database) |
55
55
|[!INCLUDE [sssql22-md](../../includes/sssql22-md.md)] and older versions | No | N/A |
56
56
57
-
<sup>AUTD</sup> Applies to Azure SQL Managed Instance configured with the [Always-up-to-date update policy](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy).
58
-
59
-
<sup>2022</sup> Applies to Azure SQL Managed Instance configured with the [SQL Server 2022 update policy](/azure/azure-sql/managed-instance/update-policy#sql-server-2022-update-policy).
60
-
61
57
### Enable and disable
62
58
63
59
To enable or disable optimized locking for a [!INCLUDE [SQL Server](../../includes/ssnoversion-md.md)] database, use the `ALTER DATABASE ... SET OPTIMIZED_LOCKING = ON | OFF` command. For more information, see [ALTER DATABASE SET options](../../t-sql/statements/alter-database-transact-sql-set-options.md?view=sql-server-ver17&preserve-view=true#optimized_locking--on--off-).
@@ -67,7 +63,7 @@ Optimized locking builds on other database features:
67
63
- You must enable [accelerated database recovery (ADR)](/azure/azure-sql/accelerated-database-recovery) on a database before you can enable optimized locking. Conversely, to disable ADR, you must disable optimized locking first if it's enabled.
68
64
- For the most benefit from optimized locking, [read committed snapshot isolation (RCSI)](../../t-sql/statements/alter-database-transact-sql-set-options.md?view=azuresqldb-current&preserve-view=true#read_committed_snapshot--on--off--1) should be enabled for the database. The [LAQ](#lock-after-qualification-laq) component of optimized locking is in effect only if RCSI is enabled.
69
65
70
-
In [!INCLUDE [asdb](../../includes/ssazure-sqldb.md)], ADR is always enabled and RCSI is enabled by default.
66
+
In [!INCLUDE [asdb](../../includes/ssazure-sqldb.md)] and [!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)], ADR is always enabled and RCSI is enabled by default.
71
67
72
68
To verify that these options are enabled for your current database, connect to the database and run the following T-SQL query:
73
69
@@ -317,7 +313,7 @@ The following improvements help you monitor and troubleshoot blocking and deadlo
317
313
- 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).
318
314
- Extended events
319
315
- 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).
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.
316
+
- In [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)] and [!INCLUDE [ssazuremi-md](../../includes/ssazuremi-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.
321
317
322
318
## Best practices with optimized locking
323
319
@@ -381,7 +377,7 @@ In the previous query example, only table `t5` uses the `REPEATABLE READ` isolat
381
377
382
378
### Is optimized locking on by default in both new and existing databases?
383
379
384
-
In [!INCLUDE [Azure SQL Database](../../includes/ssazure-sqldb.md)] and [!INCLUDE [fabric-sqldb](../../includes/fabric-sqldb.md)], yes. In [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)] optimized locking is disabled by default but can be enabled on any user database that has accelerated database recovery enabled.
380
+
In [!INCLUDE [Azure SQL Database](../../includes/ssazure-sqldb.md)], [!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)]<sup>[AUTD](/azure/azure-sql/managed-instance/update-policy#always-up-to-date-update-policy)</sup>, and [!INCLUDE [fabric-sqldb](../../includes/fabric-sqldb.md)], yes. In [!INCLUDE [sssql25-md](../../includes/sssql25-md.md)] optimized locking is disabled by default but can be enabled on any user database that has accelerated database recovery enabled.
385
381
386
382
### How can I detect if optimized locking is enabled?
0 commit comments