{"id":243188,"date":"2025-07-29T12:45:59","date_gmt":"2025-07-29T19:45:59","guid":{"rendered":"https:\/\/virtual-dba.com\/?p=243188"},"modified":"2025-10-17T10:26:20","modified_gmt":"2025-10-17T17:26:20","slug":"azure-sql-why-automatic-tuning-reverted-index-after-performance-regression","status":"publish","type":"post","link":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/","title":{"rendered":"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"h-summary\">SUMMARY:<\/h2>\n\n\n\n<p>Azure SQL Automatic Tuning successfully identified and reverted a newly created nonclustered index after investigation using the SQL Server Query Store revealed that the massive 108.15% DTU regression was caused by the index\u2019s imposed maintenance overhead on frequent BULK INSERT write operations, rather than inefficient data reads.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Automatic Tuning detected a massive performance penalty, with the overall database workload regressing by 3.89% DTU, while the specific &#8220;affected queries&#8221; regressed by 108.15% DTU.<\/li>\n\n\n\n<li>The investigation was initially complicated because the Azure Portal validation reports and the underlying <code>sys.dm_db_tuning_recommendations<\/code> DMV failed to provide the necessary <code>query_id<\/code> or query text linking the index to the negatively impacted operation.<\/li>\n\n\n\n<li>Using Query Store and filtering by table name and time window, the team discovered that the top resource consumer was a BULK INSERT statement, confirming the index was harming data writes rather than helping SELECT queries.<\/li>\n\n\n\n<li>The standard best practice for environments with heavy data loading is to temporarily disable or drop nonclustered indexes before running the bulk load, and then rebuild them afterward, as this is far more efficient than row-by-row maintenance during the load.<\/li>\n<\/ul>\n\n\n\n<p>This case validates that while automated systems protect the workload by reverting harmful changes, database optimization still requires human skill, diagnostic tools like Query Store, and collaboration across teams to understand the total impact on a mixed read\/write workload.<\/p>\n\n\n\n<div class=\"wp-block-yoast-seo-table-of-contents yoast-table-of-contents\"><h2>Table of contents<\/h2><ul><li><a href=\"#h-summary\" data-level=\"2\">SUMMARY:<\/a><\/li><li><a href=\"#h-the-initial-anomaly-a-108-performance-regression\" data-level=\"2\">The Initial Anomaly: A 108% Performance Regression<\/a><\/li><li><a href=\"#h-the-investigation-begins-finding-the-affected-query\" data-level=\"2\">The Investigation Begins: Finding the &#8220;Affected Query&#8221;<\/a><\/li><li><a href=\"#h-the-breakthrough-unmasking-the-culprit-with-query-store\" data-level=\"2\">The Breakthrough: Unmasking the Culprit with Query Store<\/a><\/li><li><a href=\"#h-the-aha-moment-understanding-the-real-problem\" data-level=\"2\">The &#8220;Aha!&#8221; Moment: Understanding the Real Problem<\/a><\/li><li><a href=\"#h-key-lessons-and-best-practices\" data-level=\"2\">Key Lessons and Best Practices<\/a><ul><li><a href=\"#h-consider-the-entire-workload\" data-level=\"3\">Consider the Entire Workload<\/a><\/li><li><a href=\"#h-the-best-practice-for-bulk-loads\" data-level=\"3\">The Best Practice for Bulk Loads \ud83d\ude80<\/a><\/li><li><a href=\"#h-trust-your-automation-but-know-how-to-verify-it\" data-level=\"3\">Trust Your Automation (But Know How to Verify It)<\/a><\/li><\/ul><\/li><li><a href=\"#h-conclusion\" data-level=\"2\">Conclusion<\/a><\/li><li><a href=\"#h-faqs\" data-level=\"1\">FAQs<\/a><\/li><\/ul><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-initial-anomaly-a-108-performance-regression\"><strong>The Initial Anomaly: A 108% Performance Regression<\/strong><\/h2>\n\n\n\n<p>One of the most powerful features within Azure SQL Managed Instance is <strong>Automatic Tuning<\/strong>. It monitors your database workload and applies performance-enhancing actions without manual intervention, such as creating a potentially missing index. But what happens when the machine gets it wrong? Or, more accurately, what happens when it gets it so right that it has to immediately undo its own work?<\/p>\n\n\n\n<p>That\u2019s the scenario we recently faced. On a <strong>reporting database<\/strong>, Automatic Tuning suggested and created a new nonclustered index. Shortly after, it automatically reverted the change, providing a validation report with some puzzling metrics:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>DTU regression (overall):<\/strong> 3.89%<\/li>\n\n\n\n<li><strong>DTU regression (affected queries):<\/strong> 108.15%<\/li>\n<\/ul>\n\n\n\n<p>For context, a Database Transaction Unit (DTU) is Azure&#8217;s blended measure of CPU, memory, and I\/O. The report told us that while the overall database workload got slightly more expensive (by ~4%), the specific query the index was meant to help got more than twice as expensive (a 108% regression).<\/p>\n\n\n\n<p>Because this was a reporting environment, our initial analysis was laser-focused on read performance. Our first logical hypothesis was that the index was a good idea in principle, but that it needed <strong>page compression<\/strong>. In reporting scenarios with large tables, creating an index with page compression can drastically reduce its size on disk, leading to fewer I\/O operations and better query performance. Our theory was that Azure created the standard index, its I\/O cost was still too high, and this caused the regression.<\/p>\n\n\n\n<p>This hypothesis seemed sound and provided a clear path forward: find the affected query, and manually recreate the index with page compression to fix the issue. This kicked off a deeper investigation that would ultimately prove our initial theory completely wrong.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-investigation-begins-finding-the-affected-query\"><strong>The Investigation Begins: Finding the &#8220;Affected Query&#8221;<\/strong><\/h2>\n\n\n\n<p>Our first step was to identify the query that was so negatively impacted. This should be easy, right? The recommendation details in the Azure Portal should have the query text or at least a <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">query_id<\/mark>.<\/code><\/p>\n\n\n\n<p>Unfortunately, this was our first dead end. The validation report in the portal UI, while showing the regression percentages, had no mention of a <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">query_id<\/mark>.<\/code><\/p>\n\n\n\n<p>No problem. We can go deeper. The next logical step is to query the underlying Dynamic Management View (DMV) that feeds the portal: <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">sys.dm_db_tuning_recommendations<\/mark><\/code>. This DMV contains a <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">details<\/mark><\/code> column with rich JSON data that should hold the key. We ran a query to parse this JSON, but to our surprise, the <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">queryId<\/mark><\/code> field was <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">NULL<\/mark><\/code>. After inspecting the raw JSON, we confirmed it wasn&#8217;t just in the wrong place\u2014it was completely missing from the log for this specific event.<\/p>\n\n\n\n<p>This was a frustrating but realistic roadblock. We had hit a limitation in the diagnostic data. It was time to pivot. If we couldn&#8217;t link the reverted index to the query via an ID, we had to link them by circumstance. We had two critical clues:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>The Object:<\/strong> The index was created on the table <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">[dbo].[Staging_ReportData]<\/mark><\/code> on the columns <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">([RecordId], [EventTimestamp])<\/mark>.<\/code><\/li>\n\n\n\n<li><strong>The Time Window:<\/strong> The JSON details gave us the exact timestamps for when the index was created and when it was reverted.<\/li>\n<\/ol>\n\n\n\n<p>The mission was now clear: find a resource-intensive query that ran against <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">[dbo].[Staging_ReportData]<\/mark><\/code> within that specific time window.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-breakthrough-unmasking-the-culprit-with-query-store\"><strong>The Breakthrough: Unmasking the Culprit with Query Store<\/strong><\/h2>\n\n\n\n<p>With our new mission defined, we turned to the ultimate tool for historical query analysis: the <strong>SQL Server Query Store<\/strong>. To simplify the process, we used the excellent open-source stored procedure <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">sp_QuickieStore<\/mark><\/code>, which provides a user-friendly way to analyze Query Store data.<\/p>\n\n\n\n<p>Since we couldn\u2019t filter by <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">query_id<\/mark><\/code>, we used the time window and the <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">@query_text_search<\/mark><\/code> parameter to find our culprit. The command was simple and precise:<\/p>\n\n\n\n<p>SQL<\/p>\n\n\n<p><pre><code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">EXEC sp_QuickieStore<br>@start_date = '2025-07-04 05:50:11',<br>@end_date = '2025-07-04 16:07:10',<br>@sort_order = 'cpu',<br>@query_text_search = 'Staging_ReportData';<\/mark><\/code><\/pre>\n<\/p>\n\n\n<p>We ran the command, expecting to see a complex reporting query at the top of the list\u2014one with a <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">WHERE<\/mark><\/code> clause that was somehow inefficiently using the new index.<\/p>\n\n\n\n<p>The result was something else entirely. The top resource-consumer, by a wide margin, was a <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">BULK INSERT<\/mark><\/code> statement targeting our <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">[dbo].[Staging_ReportData]<\/mark><\/code> table. It had run over 700 times during the validation window with a high average CPU cost. At first, this seemed wrong. Why would a data loading operation be the &#8220;affected query&#8221;?<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-aha-moment-understanding-the-real-problem\"><strong>The &#8220;Aha!&#8221; Moment: Understanding the Real Problem<\/strong><\/h2>\n\n\n\n<p>Then, it all clicked into place. The <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">BULK INSERT<\/mark><\/code> wasn&#8217;t the query the index was meant to help; it was the <strong>victim<\/strong> of the index.<\/p>\n\n\n\n<p>This revealed a fundamental database tuning principle: <strong>Indexes speed up data reads, but they slow down data writes.<\/strong><\/p>\n\n\n\n<p>Every time you <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">INSERT<\/mark><\/code>, <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">UPDATE<\/mark><\/code>, or <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">DELETE<\/mark><\/code> data, the database engine doesn&#8217;t just change the data in the table; it must also update every single nonclustered index to reflect that change. When Automatic Tuning created the new index <code>[<mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">IX_AutoTuned_ReportData_EventTimestamp<\/mark>]<\/code>, it inadvertently imposed a &#8220;tax&#8221; on our data loading process.<\/p>\n\n\n\n<p>For each of the 712 <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">BULK INSERT<\/mark><\/code> executions, the database now had to perform the extra work of inserting a new entry into our new index. That extra CPU and I\/O overhead, multiplied 712 times, was the source of the massive 108% performance regression. The &#8220;affected query&#8221; was the one being <em>harmed<\/em> by the index&#8217;s existence. This discovery also invalidated our initial theory about page compression. Adding compression to the index would have increased the CPU &#8216;tax&#8217; on the <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">BULK INSERT<\/mark><\/code>, likely making the 108% regression even worse.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-key-lessons-and-best-practices\"><strong>Key Lessons and Best Practices<\/strong><\/h2>\n\n\n\n<p>This investigation highlighted several crucial takeaways for anyone managing a database with a mixed workload.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-consider-the-entire-workload\"><strong>Consider the Entire Workload<\/strong><\/h3>\n\n\n\n<p>Don&#8217;t assume an index is only for <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">SELECT<\/mark><\/code> queries. You must always consider the impact on the entire workload, especially data modification patterns. An index that helps a monthly report run faster might be unacceptable if it cripples a data loading process that runs every five minutes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-the-best-practice-for-bulk-loads\"><strong>The Best Practice for Bulk Loads \ud83d\ude80<\/strong><\/h3>\n\n\n\n<p>Our scenario is precisely why a standard best practice exists for environments with heavy data loading operations. To maximize performance, the recommended pattern is:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Disable or Drop Indexes:<\/strong> Before the data load begins, disable or drop the nonclustered indexes on the target table.<\/li>\n\n\n\n<li><strong>Perform the Data Load:<\/strong> Run the <code><mark style=\"background-color:rgba(0, 0, 0, 0);color:#188038\" class=\"has-inline-color\">BULK INSERT<\/mark><\/code> or other loading process. This will now run much faster without the index maintenance overhead.<\/li>\n\n\n\n<li><strong>Rebuild or Recreate Indexes:<\/strong> After the load is complete, rebuild or recreate the indexes. This single, large operation is far more efficient than maintaining the indexes row-by-row during the load.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-trust-your-automation-but-know-how-to-verify-it\"><strong>Trust Your Automation (But Know How to Verify It)<\/strong><\/h3>\n\n\n\n<p>Azure&#8217;s Automatic Tuning worked perfectly. It identified a potential improvement, tested it, and, upon seeing the massive negative impact, protected the workload by reverting the change. This event reinforces the value of automated tuning, but also shows the importance of having the skills and tools like Query Store to investigate <em>why<\/em> a decision was made.<\/p>\n\n\n\n<p>To emphasize this, consider this scenario as outlined above.&nbsp; You have a database that is autotuning itself by adding indexes for reporting queries, but now notice many of those indexes are being rolled back by the same mechanism that put them in place.&nbsp; This goes directly to the hand-in-glove or it-takes-a-village approach to maintaining database optimization.&nbsp; It is not uncommon for reporting and ETL developers to be separate people\/teams.&nbsp; Recognizing this sooner will save time and resources later.<br><br>In short, the Azure Autuning feature is excellent!&nbsp; However, it requires people to work together for maximum optimization!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>What started as a confusing alert about a reverted index turned into a valuable reminder about the fundamentals of database performance. By following the clues and digging deep into the diagnostic data, we were able to solve the mystery and confirm that our automated systems were making the right call, even if the reason wasn&#8217;t immediately obvious.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"h-faqs\"><strong>FAQs<\/strong><\/h1>\n\n\n\n<p><strong>What is Azure Automatic Tuning, and what was the initial problem encountered?<\/strong><\/p>\n\n\n\n<p>Azure Automatic Tuning is a powerful feature in Azure SQL Managed Instance that automatically monitors database workloads and applies performance-enhancing actions, such as creating missing indexes, without manual intervention. In the described scenario, Automatic Tuning created a new nonclustered index, but then quickly reverted it. The puzzling part was the validation report: while the overall database workload experienced a minor 3.89% DTU regression, the specific &#8220;affected query&#8221; showed a massive 108.15% DTU regression, meaning it became more than twice as expensive.<\/p>\n\n\n\n<p><strong>Why was identifying the &#8220;affected query&#8221; so challenging?<\/strong><\/p>\n\n\n\n<p>The process of identifying the negatively impacted query faced several roadblocks. Initially, the Azure Portal&#8217;s validation report, while showing regression percentages, did not provide the query_id or query text. Further investigation by querying the sys.dm_db_tuning_recommendations Dynamic Management View (DMV) also revealed that the queryId field was NULL and completely missing from the rich JSON details for this specific event. This diagnostic data limitation meant the team couldn&#8217;t directly link the reverted index to a specific query ID.<\/p>\n\n\n\n<p><strong>How was the &#8220;affected query&#8221; ultimately identified without a query_id?<\/strong><\/p>\n\n\n\n<p>Unable to link by query_id, the team pivoted to linking by circumstance, using two critical clues: the specific table and columns on which the index was created ([dbo].[Staging_ReportData] on ([RecordId], [EventTimestamp])), and the exact time window provided by the JSON details when the index was created and reverted. They then used the SQL Server Query Store, specifically the sp_QuickieStore stored procedure, to find resource-intensive queries against Staging_ReportData within that time window. This led them to discover that a BULK INSERT statement was the top resource consumer.<\/p>\n\n\n\n<p><strong>What was the &#8220;Aha!&#8221; moment regarding the BULK INSERT?<\/strong><\/p>\n\n\n\n<p>The &#8220;Aha!&#8221; moment came when it was realized that the BULK INSERT wasn&#8217;t the query the index was intended to help; instead, it was the query being significantly harmed by the index&#8217;s presence. This highlighted a fundamental database tuning principle: while indexes speed up data reads (SELECT queries), they inherently slow down data writes (INSERT, UPDATE, DELETE operations). Every time data is modified, all associated nonclustered indexes must also be updated. The new index imposed an &#8220;extra tax&#8221; on each of the 712 BULK INSERT executions, leading to increased CPU and I\/O overhead, which manifested as the 108% performance regression.<\/p>\n\n\n\n<p><strong>Why did the initial hypothesis about page compression prove wrong?<\/strong><\/p>\n\n\n\n<p>The initial hypothesis was that the index was conceptually good but needed page compression to reduce I\/O costs, especially in a reporting environment with large tables. However, once the BULK INSERT was identified as the culprit, this hypothesis was invalidated. Adding page compression to the index would have further increased the CPU overhead for the BULK INSERT operation, making the 108% regression even worse, as compression adds more processing during write operations.<\/p>\n\n\n\n<p><strong>What key lessons were learned about considering the entire workload?<\/strong><\/p>\n\n\n\n<p>A crucial lesson learned was the importance of considering the entire database workload, not just SELECT queries, when implementing indexes. An index beneficial for read performance might severely impact write operations if those operations are frequent or critical. The example showed that an index helping a monthly report could be detrimental if it cripples a data loading process that runs much more frequently, like every five minutes. Database optimization requires a holistic view of all operations.<\/p>\n\n\n\n<p><strong>What is the recommended best practice for environments with heavy data loading operations?<\/strong><\/p>\n\n\n\n<p>For environments with heavy data loading operations (like BULK INSERT), the standard best practice is to:<\/p>\n\n\n\n<p><strong>Disable or Drop Indexes: <\/strong>Temporarily remove nonclustered indexes on the target table before the data load.<\/p>\n\n\n\n<p><strong>Perform the Data Load:<\/strong> Execute the BULK INSERT or other loading process, which will run much faster without the index maintenance overhead.<\/p>\n\n\n\n<p><strong>Rebuild or Recreate Indexes:<\/strong> After the data load is complete, rebuild or recreate the indexes. This single, large operation is far more efficient than maintaining indexes row-by-row during the load.<\/p>\n\n\n\n<p><strong>How does this scenario reinforce the value of automated tuning and collaboration?<\/strong><\/p>\n\n\n\n<p>This scenario reinforces that Azure&#8217;s Automatic Tuning works effectively; it identified a potential improvement, tested it, and correctly reverted the change upon detecting a significant negative impact, thus protecting the workload. It highlights the value of automated systems. However, it also underscores the importance of human skills and tools like Query Store to investigate why a decision was made. The incident demonstrates that while automation is excellent, maximum optimization often requires collaboration between different teams (e.g., reporting and ETL developers) who understand the full scope of database operations to address issues proactively.<\/p>\n\n\n\n<p>For more on effortless <a href=\"https:\/\/virtual-dba.com\/platforms\/azure\/\">Azure<\/a> Management, contact us today! <\/p>\n","protected":false},"excerpt":{"rendered":"<p>When Azure SQL&#8217;s Automatic Tuning feature creates and then immediately reverts an index, it&#8217;s a sign that something is wrong. But what happens when the performance regression is a staggering 108%? We dive deep into a real-world troubleshooting scenario to uncover a surprising culprit and a critical database tuning lesson.<\/p>\n","protected":false},"author":74,"featured_media":243201,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","content-type":"","footnotes":""},"categories":[4018,4166],"tags":[3689,4202,4203,3890],"class_list":["post-243188","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-blog","tag-azure","tag-azure-sql","tag-azure-sql-performance","tag-sql"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.1 (Yoast SEO v27.1.1) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression - Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts<\/title>\n<meta name=\"description\" content=\"Azure&#039;s Automatic Tuning reverted an index after a 108% DTU regression. Follow our investigation to see why the culprit was a BULK INSERT.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression\" \/>\n<meta property=\"og:description\" content=\"Azure&#039;s Automatic Tuning reverted an index after a 108% DTU regression. Follow our investigation to see why the culprit was a BULK INSERT.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/\" \/>\n<meta property=\"og:site_name\" content=\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\" \/>\n<meta property=\"article:published_time\" content=\"2025-07-29T19:45:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-10-17T17:26:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"557\" \/>\n\t<meta property=\"og:image:height\" content=\"291\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Heath McKerrow\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:site\" content=\"@virtual_dba\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Heath McKerrow\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/\"},\"author\":{\"name\":\"Heath McKerrow\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/3576e47bbeee17a948878157a1f38c4c\"},\"headline\":\"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression\",\"datePublished\":\"2025-07-29T19:45:59+00:00\",\"dateModified\":\"2025-10-17T17:26:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/\"},\"wordCount\":2320,\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg\",\"keywords\":[\"azure\",\"Azure SQL\",\"Azure SQL performance\",\"sql\"],\"articleSection\":[\"Azure\",\"Blog\"],\"inLanguage\":\"en-US\",\"accessibilityFeature\":[\"tableOfContents\"]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/\",\"url\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/\",\"name\":\"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression - Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\",\"isPartOf\":{\"@id\":\"https:\/\/virtual-dba.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg\",\"datePublished\":\"2025-07-29T19:45:59+00:00\",\"dateModified\":\"2025-10-17T17:26:20+00:00\",\"description\":\"Azure's Automatic Tuning reverted an index after a 108% DTU regression. Follow our investigation to see why the culprit was a BULK INSERT.\",\"breadcrumb\":{\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#primaryimage\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg\",\"width\":557,\"height\":291,\"caption\":\"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/virtual-dba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/virtual-dba.com\/#website\",\"url\":\"https:\/\/virtual-dba.com\/\",\"name\":\"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts\",\"description\":\"Remote Database Administration\",\"publisher\":{\"@id\":\"https:\/\/virtual-dba.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/virtual-dba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/virtual-dba.com\/#organization\",\"name\":\"Virtual-DBA: Remote DBA | Remote Database Administration\",\"alternateName\":\"Virtual-DBA powered by XTIVIA\",\"url\":\"https:\/\/virtual-dba.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"contentUrl\":\"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg\",\"width\":557,\"height\":291,\"caption\":\"Virtual-DBA: Remote DBA | Remote Database Administration\"},\"image\":{\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/virtual_dba\",\"https:\/\/www.linkedin.com\/showcase\/36220649\/\",\"https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg\"],\"description\":\"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.\",\"email\":\"info@xtivia.com\",\"telephone\":\"8886853101\",\"legalName\":\"XTIVIA, Inc\",\"foundingDate\":\"1992-05-01\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"201\",\"maxValue\":\"500\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/3576e47bbeee17a948878157a1f38c4c\",\"name\":\"Heath McKerrow\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4a6b7b46f3c1fb87c58590ee5c6ba7c86953b65abfce2cbc59394d9919774a70?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4a6b7b46f3c1fb87c58590ee5c6ba7c86953b65abfce2cbc59394d9919774a70?s=96&d=mm&r=g\",\"caption\":\"Heath McKerrow\"},\"url\":\"https:\/\/virtual-dba.com\/author\/heath-mckerrow\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression - Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","description":"Azure's Automatic Tuning reverted an index after a 108% DTU regression. Follow our investigation to see why the culprit was a BULK INSERT.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/","og_locale":"en_US","og_type":"article","og_title":"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression","og_description":"Azure's Automatic Tuning reverted an index after a 108% DTU regression. Follow our investigation to see why the culprit was a BULK INSERT.","og_url":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/","og_site_name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","article_published_time":"2025-07-29T19:45:59+00:00","article_modified_time":"2025-10-17T17:26:20+00:00","og_image":[{"width":557,"height":291,"url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg","type":"image\/jpeg"}],"author":"Heath McKerrow","twitter_card":"summary_large_image","twitter_creator":"@virtual_dba","twitter_site":"@virtual_dba","twitter_misc":{"Written by":"Heath McKerrow","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#article","isPartOf":{"@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/"},"author":{"name":"Heath McKerrow","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/3576e47bbeee17a948878157a1f38c4c"},"headline":"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression","datePublished":"2025-07-29T19:45:59+00:00","dateModified":"2025-10-17T17:26:20+00:00","mainEntityOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/"},"wordCount":2320,"publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg","keywords":["azure","Azure SQL","Azure SQL performance","sql"],"articleSection":["Azure","Blog"],"inLanguage":"en-US","accessibilityFeature":["tableOfContents"]},{"@type":"WebPage","@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/","url":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/","name":"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression - Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","isPartOf":{"@id":"https:\/\/virtual-dba.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#primaryimage"},"image":{"@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#primaryimage"},"thumbnailUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg","datePublished":"2025-07-29T19:45:59+00:00","dateModified":"2025-10-17T17:26:20+00:00","description":"Azure's Automatic Tuning reverted an index after a 108% DTU regression. Follow our investigation to see why the culprit was a BULK INSERT.","breadcrumb":{"@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#primaryimage","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/An-Azure-SQL-Detective-Story-Why-Automatic-Tuning-Reverted-an-Index-After-a-108-Performance-Regression.jpg","width":557,"height":291,"caption":"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression"},{"@type":"BreadcrumbList","@id":"https:\/\/virtual-dba.com\/blog\/azure-sql-why-automatic-tuning-reverted-index-after-performance-regression\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/virtual-dba.com\/"},{"@type":"ListItem","position":2,"name":"An Azure SQL Detective Story: Why Automatic Tuning Reverted an Index After a 108% Performance Regression"}]},{"@type":"WebSite","@id":"https:\/\/virtual-dba.com\/#website","url":"https:\/\/virtual-dba.com\/","name":"Virtual-DBA Remote DBA Services &amp; Support - Certified Database Experts","description":"Remote Database Administration","publisher":{"@id":"https:\/\/virtual-dba.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/virtual-dba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/virtual-dba.com\/#organization","name":"Virtual-DBA: Remote DBA | Remote Database Administration","alternateName":"Virtual-DBA powered by XTIVIA","url":"https:\/\/virtual-dba.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/","url":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","contentUrl":"https:\/\/virtual-dba.com\/wp-content\/uploads\/V-DBA-Database-Services-and-Support-Featured-Logo.jpg","width":557,"height":291,"caption":"Virtual-DBA: Remote DBA | Remote Database Administration"},"image":{"@id":"https:\/\/virtual-dba.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/virtual_dba","https:\/\/www.linkedin.com\/showcase\/36220649\/","https:\/\/www.youtube.com\/channel\/UCx3AIeUQ2ziTLKZSJDZ-SEg"],"description":"Eliminate database downtime and spiraling costs with XTIVIA\u2019s Virtual-DBA. In today\u2019s always-on business world, gaps in 24x7 on-call DBA support, neglected maintenance and security, or a stretched team struggling with overwhelming workloads can lead to costly disruptions and threaten business continuity. XTIVIA\u2019s Virtual-DBA provides the immediate, expert database administration you need, exactly when you need it, ensuring optimal performance, ironclad security, and significant cost savings without the burden of expanding your in-house team. The goal of Virtual-DBA is to provide a cost-effective solution for organizations seeking to optimize the security, management, maintenance, availability, and performance of their critical business systems, whether self-managed or cloud-managed (e.g., AWS RDS, Azure SQL Database). We accomplish this through a comprehensive remote DBA service offering designed specifically to meet the Oracle\u00ae, DB2\u00ae, Informix\u00ae, MySQL\u2122, PostgreSQL\u00ae, MongoDB\u00ae, MariaDB, and Microsoft SQL Server\u00ae, CockroachDB, Databricks, AWS, and Azure needs of our clients.","email":"info@xtivia.com","telephone":"8886853101","legalName":"XTIVIA, Inc","foundingDate":"1992-05-01","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"201","maxValue":"500"}},{"@type":"Person","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/3576e47bbeee17a948878157a1f38c4c","name":"Heath McKerrow","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/virtual-dba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4a6b7b46f3c1fb87c58590ee5c6ba7c86953b65abfce2cbc59394d9919774a70?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4a6b7b46f3c1fb87c58590ee5c6ba7c86953b65abfce2cbc59394d9919774a70?s=96&d=mm&r=g","caption":"Heath McKerrow"},"url":"https:\/\/virtual-dba.com\/author\/heath-mckerrow\/"}]}},"_links":{"self":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/243188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/users\/74"}],"replies":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/comments?post=243188"}],"version-history":[{"count":0,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/posts\/243188\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media\/243201"}],"wp:attachment":[{"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/media?parent=243188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/categories?post=243188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/virtual-dba.com\/wp-json\/wp\/v2\/tags?post=243188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}