{"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-29T01:48:17","modified_gmt":"2026-07-28T23:48:17","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 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 decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-27.png\" alt=\"\" class=\"wp-image-45984\" \/><\/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=\"nv-cv-m 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 decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-28.png\" alt=\"\" class=\"wp-image-45985\" style=\"width:561px;height:auto\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-29.png\" alt=\"\" class=\"wp-image-45986\" \/><\/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 decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-30.png\" alt=\"\" class=\"wp-image-45987\" \/><\/figure>\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 decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-33-1024x609.png\" alt=\"\" class=\"wp-image-45992\" \/><\/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 decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-34-1024x337.png\" alt=\"\" class=\"wp-image-45991\" \/><\/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 is-style-stripes\"><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 decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-36.png\" alt=\"\" class=\"wp-image-45996\" \/><\/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 is-style-stripes\"><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 decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-37.png\" alt=\"\" class=\"wp-image-45997\" \/><\/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 is-style-stripes\"><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 decoding=\"async\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/07\/image-40.png\" alt=\"\" class=\"wp-image-46000\" \/><\/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=\"nv-cv-d nv-cv-m 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;&nbsp;<\/p>\n","protected":false},"author":147,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[3271,4133,99],"tags":[],"class_list":["post-45983","post","type-post","status-publish","format-standard","hentry","category-azure","category-database","category-sql-server"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.8 (Yoast SEO v28.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2 - dbi services | 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;&nbsp;\" \/>\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 services | Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-28T23:48:17+00:00\" \/>\n<meta name=\"author\" content=\"Amine Haloui\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\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\\\/80b2137592929f6857e53b609cc1ee0f\"},\"headline\":\"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2\",\"datePublished\":\"2026-07-28T23:48:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/sql-server-automatic-index-compaction-in-azure-preview-part-2\\\/\"},\"wordCount\":809,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"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\\\/2026\\\/07\\\/image-27.png\",\"articleSection\":[\"Azure\",\"Database\",\"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 services | 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\\\/2026\\\/07\\\/image-27.png\",\"datePublished\":\"2026-07-28T23:48:17+00:00\",\"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\":\"\",\"contentUrl\":\"\"},{\"@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 services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"alternateName\":\"dbi Blog\",\"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\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\",\"name\":\"dbi services\",\"alternateName\":\"dbi\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialised in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/80b2137592929f6857e53b609cc1ee0f\",\"name\":\"Amine Haloui\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/AHI_web.jpg\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/AHI_web.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2024\\\/03\\\/AHI_web.jpg\",\"caption\":\"Amine Haloui\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/amine-haloui\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2 - dbi services | 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;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/","og_site_name":"dbi services | Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2026-07-28T23:48:17+00:00","author":"Amine Haloui","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","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\/80b2137592929f6857e53b609cc1ee0f"},"headline":"SQL Server: Automatic index compaction in Azure (preview) \u2013 Part 2","datePublished":"2026-07-28T23:48:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/sql-server-automatic-index-compaction-in-azure-preview-part-2\/"},"wordCount":809,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"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\/2026\/07\/image-27.png","articleSection":["Azure","Database","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 services | 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\/2026\/07\/image-27.png","datePublished":"2026-07-28T23:48:17+00:00","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":"","contentUrl":""},{"@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 services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"alternateName":"dbi Blog","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":"Organization","@id":"https:\/\/www.dbi-services.com\/blog\/#organization","name":"dbi services","alternateName":"dbi","url":"https:\/\/www.dbi-services.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialised in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/80b2137592929f6857e53b609cc1ee0f","name":"Amine Haloui","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/03\/AHI_web.jpg","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/03\/AHI_web.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2024\/03\/AHI_web.jpg","caption":"Amine Haloui"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/amine-haloui\/"}]}},"_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":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/45983\/revisions"}],"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"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}