{"id":45983,"date":"2026-07-29T01:48:17","date_gmt":"2026-07-28T23:48:17","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=45983"},"modified":"2026-07-29T02:05:34","modified_gmt":"2026-07-29T00:05:34","slug":"sql-server-automatic-index-compaction-in-azure-preview-part-2","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/","title":{"rendered":"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><strong>Why does index fragmentation matter less than before ?<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Logical fragmentation was a problem on spinning disks: an ordered scan on a fragmented index broke the read-ahead into smaller I\/Os and each jump cost a disk head movement. On SSD, NVMe and cloud storage, the penalty of non-sequential reads is marginal. And the &#8220;physical order&#8221; we used to restore so carefully is only the order of the pages inside the data file: below it, the file system, the SSD controller and the storage layer place the blocks wherever they want anyway.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Here is the mapping to remember<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Internal fragmentation = page density = fixed by automatic index compaction<\/li>\n\n\n\n<li>External fragmentation = page order = ignored by automatic index compaction (it can even increase slightly and we will see it in the demo)<\/li>\n<\/ul>\n\n\n\n<h2 id=\"h-how-does-it-work\" class=\"wp-block-heading\">How does it work ?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Automatic index compaction is not a hidden maintenance job. It is an additional task performed by a background process that already exists: the PVS cleaner is a component of Accelerated Database Recovery (ADR).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Here is the principle<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The PVS cleaner periodically visits the pages that were recently modified (insert, update, delete) to remove obsolete row versions<\/li>\n\n\n\n<li>When automatic index compaction is enabled the cleaner also checks if the visited page has free space excluding the space reserved by the fill factor<\/li>\n\n\n\n<li>If so, it moves rows from the next page into the current page as long as they fit and repeats the operation on a few consecutive page pairs<\/li>\n\n\n\n<li>A page that becomes empty is deallocated<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The result: the number of pages decreases, the page density increases, and the storage space, I\/O, CPU and buffer pool consumption decrease.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The overhead is minimal because the process only considers recently modified pages, unlike a rebuild or a reorganize which process all the pages. Like a reorganize, the compaction acquires short-term exclusive page locks to move the rows. If a lock cannot be acquired immediately, the page is simply skipped and will be considered again later.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One command per database, no restart, no exclusive access. The compaction starts within minutes:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- Enable the feature\nALTER DATABASE &#091;SQL-DB-1] SET AUTOMATIC_INDEX_COMPACTION = ON;\n\n-- Check if it's enabled\nSELECT name, is_automatic_index_compaction_on FROM sys.databases;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"189\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27.png\" alt=\"\" class=\"wp-image-45984\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27.png 619w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27-300x92.png 300w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>One important point before you enable it<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The compaction process only considers the pages modified after you enable the feature. If the page density of your indexes is already low, run a one-time reorganize or rebuild to fix the existing situation. From that point on, the automatic compaction keeps the indexes compact without any action on your side.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Demo<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We create a table with a clustered primary key and we insert 5 million rows<\/li>\n\n\n\n<li>We measure the baseline: page count, page density, fragmentation<\/li>\n\n\n\n<li>We delete 2 rows out of 3, scattered over the whole table, to simulate index bloat<\/li>\n\n\n\n<li>We measure again and we let the engine work<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We create the table and we insert 50K rows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE TABLE dbo.Demo (\n    Id      int IDENTITY CONSTRAINT PK_Demo PRIMARY KEY CLUSTERED,\n    Payload char(400) NOT NULL DEFAULT REPLICATE('X', 400)\n);\n\nINSERT INTO dbo.Demo (Payload)\nSELECT TOP (50000) REPLICATE('X', 400)\nFROM sys.all_columns a CROSS JOIN sys.all_columns b;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">We measure the baseline:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT index_level, page_count, avg_page_space_used_in_percent,\n       avg_fragmentation_in_percent, record_count\nFROM sys.dm_db_index_physical_stats(DB_ID(), OBJECT_ID('dbo.Demo'),1, NULL, 'SAMPLED')\nWHERE alloc_unit_type_desc = 'IN_ROW_DATA';<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"561\" height=\"187\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-28.png\" alt=\"\" class=\"wp-image-45985\" style=\"width:561px;height:auto\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-28.png 561w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-28-300x100.png 300w\" sizes=\"auto, (max-width: 561px) 100vw, 561px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"644\" height=\"301\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-29.png\" alt=\"\" class=\"wp-image-45986\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-29.png 644w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-29-300x140.png 300w\" sizes=\"auto, (max-width: 644px) 100vw, 644px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We measure the baseline:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT index_level, page_count, avg_page_space_used_in_percent,\n       avg_fragmentation_in_percent, record_count\nFROM sys.dm_db_index_physical_stats(DB_ID(), OBJECT_ID('dbo.Demo'),1, NULL, 'SAMPLED')\nWHERE alloc_unit_type_desc = 'IN_ROW_DATA';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The internal fragmentation is low.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"600\" height=\"48\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-30.png\" alt=\"\" class=\"wp-image-45987\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-30.png 600w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-30-300x24.png 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what we have:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here is what we have:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"609\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-33-1024x609.png\" alt=\"\" class=\"wp-image-45992\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-33-1024x609.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-33-300x178.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-33-768x457.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-33.png 1500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">However to observe the automatic index compaction in action we need to create the following situation:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"337\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-34-1024x337.png\" alt=\"\" class=\"wp-image-45991\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-34-1024x337.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-34-300x99.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-34-768x253.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-34.png 1500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Here is the baseline:<\/p>\n\n\n\n<figure class=\"wp-block-table alignwide\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>page_count<\/strong><\/td><td><strong>avg_page_space_used_in_percent<\/strong><\/td><td><strong>avg_fragmentation_in_percent<\/strong><\/td><td><strong>record_count<\/strong><\/td><\/tr><tr><td>2778<\/td><td>94.9269335310106<\/td><td>0.0359971202303816<\/td><td>50000<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>We create the bloat<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We delete 2 rows out of 3 scattered uniformly over the table. No page becomes empty. Every page keeps around one third of its rows. We change page density:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DELETE FROM dbo.Demo WHERE Id % 3 &lt;&gt; 0;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"393\" height=\"49\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-36.png\" alt=\"\" class=\"wp-image-45996\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-36.png 393w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-36-300x37.png 300w\" sizes=\"auto, (max-width: 393px) 100vw, 393px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Without automatic index compaction, the expectation is simple: the page count stays at 277778 (deletes alone do not deallocate non-empty pages) and the density drops to around 31% (one third of 94.93%).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>We measure again<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>page_count<\/strong><\/td><td><strong>avg_page_space_used_in_percent<\/strong><\/td><td><strong>avg_fragmentation_in_percent<\/strong><\/td><td><strong>record_count<\/strong><\/td><\/tr><tr><td>2778<\/td><td>31.6245737583395<\/td><td>0.0359971202303816<\/td><td>16666<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"160\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-37.png\" alt=\"\" class=\"wp-image-45997\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-37.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-37-300x63.png 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>We let the engine finish its job and we check again<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>page_count<\/strong><\/td><td><strong>avg_page_space_used_in_percent<\/strong><\/td><td><strong>avg_fragmentation_in_percent<\/strong><\/td><td>re<strong>cord_count<\/strong><\/td><\/tr><tr><td>929<\/td><td>94.6165184086978<\/td><td>99.8923573735199<\/td><td>16666<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"574\" height=\"43\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-40.png\" alt=\"\" class=\"wp-image-46000\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-40.png 574w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-40-300x22.png 300w\" sizes=\"auto, (max-width: 574px) 100vw, 574px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The engine did the work in the background while the database stayed fully available.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This feature replaces the compaction part of your maintenance strategy not the whole strategy.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>A summary<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It does not update the statistics. A rebuild updates them the automatic compaction does not. If you rely on your rebuild jobs to refresh the statistics, keep a statistics update job.<\/li>\n\n\n\n<li>It does not reduce the logical fragmentation and it can even increase as we saw in the demo. For most workloads this has no measurable impact<\/li>\n\n\n\n<li>It does not recreate the free space reserved by the fill factor. Only a rebuild does. Workloads that need a fill factor below 100 to reduce page splits can still benefit from an occasional rebuild<\/li>\n\n\n\n<li>It does not shrink the data files. The used space decreases, the allocated size does not change<\/li>\n\n\n\n<li>It only applies to the leaf level of B-tree indexes in IN_ROW_DATA allocation units. Heaps, LOB data, row-overflow data, compressed columnstore rowgroups and memory-optimized tables are not concerned<\/li>\n\n\n\n<li>Indexes with page locks disabled (ALLOW_PAGE_LOCKS = OFF) are not eligible<\/li>\n<\/ul>\n\n\n\n<h2 id=\"h-reference\" class=\"wp-block-heading\">Reference<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/relational-databases\/indexes\/automatic-index-compaction?view=fabric-sqldb\">Automatic Index Compaction &#8211; SQL Server | Microsoft Learn<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you. <a href=\"https:\/\/www.linkedin.com\/in\/amine-haloui-76968056\/\" data-type=\"link\" data-id=\"https:\/\/www.linkedin.com\/in\/amine-haloui-76968056\/\">Amine Haloui<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why does index fragmentation matter less than before ? Logical fragmentation was a problem on spinning disks: an ordered scan on a fragmented index broke the read-ahead into smaller I\/Os and each jump cost a disk head movement. On SSD, NVMe and cloud storage, the penalty of non-sequential reads is marginal. And the &#8220;physical order&#8221; [&hellip;]<\/p>\n","protected":false},"author":147,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","_members_access_role":[],"_members_access_error":""},"categories":[3271,229,99],"tags":[1338,51],"type_dbi":[2881,2874],"class_list":["post-45983","post","type-post","status-publish","format-standard","hentry","category-azure","category-database-administration-monitoring","category-sql-server","tag-azure","tag-sql-server","type-azure","type-sql-server"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.0 (Yoast SEO v28.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2 - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2\" \/>\n<meta property=\"og:description\" content=\"Why does index fragmentation matter less than before ? Logical fragmentation was a problem on spinning disks: an ordered scan on a fragmented index broke the read-ahead into smaller I\/Os and each jump cost a disk head movement. On SSD, NVMe and cloud storage, the penalty of non-sequential reads is marginal. And the &#8220;physical order&#8221; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-28T23:48:17+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-29T00:05:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27.png\" \/>\n\t<meta property=\"og:image:width\" content=\"619\" \/>\n\t<meta property=\"og:image:height\" content=\"189\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Amine Haloui\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Amine Haloui\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/\"},\"author\":{\"name\":\"Amine Haloui\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/221331d69d49c63fca67069b49b813fe\"},\"headline\":\"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2\",\"datePublished\":\"2026-07-28T23:48:17+00:00\",\"dateModified\":\"2026-07-29T00:05:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/\"},\"wordCount\":815,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2026\\\/07\\\/image-27.png\",\"keywords\":[\"Azure\",\"SQL Server\"],\"articleSection\":[\"Azure\",\"Database Administration &amp; Monitoring\",\"SQL Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/\",\"name\":\"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2 - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2026\\\/07\\\/image-27.png\",\"datePublished\":\"2026-07-28T23:48:17+00:00\",\"dateModified\":\"2026-07-29T00:05:34+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/221331d69d49c63fca67069b49b813fe\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2026\\\/07\\\/image-27.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2026\\\/07\\\/image-27.png\",\"width\":619,\"height\":189},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/221331d69d49c63fca67069b49b813fe\",\"name\":\"Amine Haloui\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/64707272207cd8d2667aefcb212f3ff5d19a15813da5aad6553f109d1f1afec1?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/64707272207cd8d2667aefcb212f3ff5d19a15813da5aad6553f109d1f1afec1?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/64707272207cd8d2667aefcb212f3ff5d19a15813da5aad6553f109d1f1afec1?s=96&d=mm&r=g\",\"caption\":\"Amine Haloui\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/aminehaloui\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2 - dbi Blog","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:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2","og_description":"Why does index fragmentation matter less than before ? Logical fragmentation was a problem on spinning disks: an ordered scan on a fragmented index broke the read-ahead into smaller I\/Os and each jump cost a disk head movement. On SSD, NVMe and cloud storage, the penalty of non-sequential reads is marginal. And the &#8220;physical order&#8221; [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/","og_site_name":"dbi Blog","article_published_time":"2026-07-28T23:48:17+00:00","article_modified_time":"2026-07-29T00:05:34+00:00","og_image":[{"width":619,"height":189,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27.png","type":"image\/png"}],"author":"Amine Haloui","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Amine Haloui","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/"},"author":{"name":"Amine Haloui","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/221331d69d49c63fca67069b49b813fe"},"headline":"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2","datePublished":"2026-07-28T23:48:17+00:00","dateModified":"2026-07-29T00:05:34+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/"},"wordCount":815,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27.png","keywords":["Azure","SQL Server"],"articleSection":["Azure","Database Administration &amp; Monitoring","SQL Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/","url":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/","name":"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2 - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27.png","datePublished":"2026-07-28T23:48:17+00:00","dateModified":"2026-07-29T00:05:34+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/221331d69d49c63fca67069b49b813fe"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2026\/07\/image-27.png","width":619,"height":189},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/221331d69d49c63fca67069b49b813fe","name":"Amine Haloui","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/64707272207cd8d2667aefcb212f3ff5d19a15813da5aad6553f109d1f1afec1?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/64707272207cd8d2667aefcb212f3ff5d19a15813da5aad6553f109d1f1afec1?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/64707272207cd8d2667aefcb212f3ff5d19a15813da5aad6553f109d1f1afec1?s=96&d=mm&r=g","caption":"Amine Haloui"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/aminehaloui\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/45983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/147"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=45983"}],"version-history":[{"count":10,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/45983\/revisions"}],"predecessor-version":[{"id":46017,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/45983\/revisions\/46017"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=45983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=45983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=45983"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=45983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}