Skip to content

Daniel Crawford's Data Blog

Tips for performant database designs

Menu
  • Home
  • Blog
  • Resources
  • About
  • Contact
Menu

Synapse Fundamentals for Tuning – Indexes Part1

Posted on August 31, 2022September 5, 2025 by Daniel Crawford

If you have been around SQL Server for any length of time, you know by now that indexes are critical for performance.  In Synapse Dedicated SQL Pools, indexes play a lesser role in query tuning because they do not impact the DSQL plans but rather impact the SQL plans on each of the distributions for each of the steps.  When tuning a Synapse query, indexes are still important but are generally not the lowest hanging fruit when looking for a quick performance boost.  Generally speaking, the number one thing you can do to boost performance quickly with very little effort, is simply to update statistics.  If statistics are all accurate and you notice a particular step or multiple steps in the DSQL plan taking a long time, you should then look at indexes.

Defaults

When creating a table in Synapse Dedicated SQL Pools, the default index on that table is a clustered columnstore index (CCI) if not specified.  However, CCI is not always the best option for tables but is a good starting place for large tables which should be a good portion of the tables in your data warehouse.  Below I will summarize the index types and when they are and are not ideal.

Index Types

Clustered Columnstore indexes are great for large tables with lots of integers.  That doesn’t mean that they aren’t good for character fields, but those fields just don’t compress as well as integers/numerics/bits/dates.  (Note that LOB datatypes such as varchar(max) are not supported in CCI’s.) CCI’s store the data in a columnar format, grouped into chunks called rowgroups.  Rowgroups are usually asynchronously compressed (via a background process called the tuple mover) to improve storage and performance many times over rowstore storage.  For datasets smaller than 60 million records in Synapse, a clustered index may perform better due to the overhead of any uncompressed records which are stored in rowstore format (in what is called the delta store) until they are compressed (generally when the rowgroup reaches ~1 million records).

Clustered Indexes are exactly what they always have been in SQL Server – a rowstore b-tree index that stores data in sequential pages.  Records are ordered for fast data retrieval. The only difference in Synapse is that the data is sharded across your distributions first based upon the distribution property of the table.  In an ideal world, your clustered index will be 1/60th of the total size of the table and therefore perform much faster than in regular SQL Server.

Heaps just like clustered indexes are simply data pages stored in rowstore format with no ordering.  As data is deleted from a heap, you will need to rebuild it to help performance.  This is no different than SQL Server just distributed across 60 distributions. 

Nonclustered Indexes: Sometimes these are called secondary indexes.  The data is not physically stored here, but this is a b-tree index that exists in addition to the physical storage of the table (CCI, clustered, or heap).  Nonclustered indexes are created to improve performance of specific queries.  Generally, composite indexes can be created for filter and join criteria to improve performance.  In Synapse Dedicated SQL Pools, nonclustered indexes are generally not needed as frequently since a combination of CCI rowgroups and the distribution of data separates data into small enough pieces that a secondary index doesn’t produce significant gain in performance (in most but not all cases).

I will discuss index maintenance in a follow up post which will provide greater insight into CCI internals.

Loading

Categories

  • Architecture Patterns
  • Fabric
  • Performance Tuning
  • Synapse
  • Top 10 Performance Considerations

Archives

  • July 2023
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022

Recent Synapse Videos

In this video Bogdan joins Stijn to talk about Microsoft Fabric performance and what happens underneath the hood while processing a query! <br /><br />  <br /><br />Polaris white paper: https://www.vldb.org/pvldb/vol13/p3204-saborit.pdf <br /><br />  <br /><br />Bogdan Crivat - VP Synapse Analytics<br /><br />https://twitter.com/bogdanC_guid <br /><br />https://www.linkedin.com/in/bogdanc/ <br /><br />  <br /><br />Stijn Wynants - Senior Product Manager <br />https://www.linkedin.com/in/stijn-wynants-ba528660/ <br />https://sql-stijn.com/ <br />https://twitter.com/SQLStijn
Performance at Scale with Microsoft Fabric: Query Processing!
As part of our Fabric Espresso series, we're diving deep into the realm of Data Engineering and Data Science. Join us as our senior product managers - Estera Kot, Ted Vilutis, and Stijn Wynants discuss the crucial features of Microsoft Fabric that every data engineer should know about! <br /><br />From insights into data engineering within Microsoft Fabric to decision guides for copying data into Fabric, and shortcuts that point to other storage locations - we've got it all covered in this exciting new video. <br /><br />Check out these key resources for a deep dive: <br /><br />👉 Data Engineering in Microsoft Fabric: https://learn.microsoft.com/en-us/fabric/data-engineering/data-engineering-overview  <br /><br />👉 Decision Guide to Copy Data into Fabric: https://learn.microsoft.com/en-us/fabric/get-started/decision-guide-pipeline-dataflow-spark <br /><br />👉 Shortcuts to Other Storage Locations: https://learn.microsoft.com/en-us/fabric/onelake/onelake-shortcuts <br /><br />  <br /><br />Meet the Speakers: <br /><br />1️⃣ Stijn Wynants: Senior Product Manager at Microsoft <br /><br />LinkedIn: https://www.linkedin.com/in/stijn-wynants-ba528660/ <br /><br />Twitter: https://twitter.com/SQLStijn <br /><br />Blog: https://sql-stijn.com/ <br /><br />  <br /><br />2️⃣ Estera Kot: Senior Product Manager at Microsoft <br /><br />LinkedIn: https://www.linkedin.com/in/esterakot/ <br /><br />Twitter: https://twitter.com/estera_kot <br /><br />  <br /><br />3️⃣ Ted Vilutis: Senior Product Manager at Microsoft <br /><br />LinkedIn: https://www.linkedin.com/in/tedvilutis/ <br /><br />Twitter: https://twitter.com/tvilutis <br /><br />  <br /><br />Don't miss out on this opportunity to learn directly from the Microsoft Fabric Product Group Team and elevate your data engineering skills with Microsoft Fabric! 🚀
Top Microsoft Fabric Features that Every Data Engineer Should Know
Welcome to our Fabric Espresso series! In this video Ambika joins Stijn to talk about table clone in Warehouse within Microsoft Fabric. We will talk a bit more deep on what is a table clone, when and how to use a table clone.<br /><br />Clone table: https://learn.microsoft.com/fabric/data-warehouse/clone-table<br />Clone table using T-SQL: https://learn.microsoft.com/fabric/data-warehouse/tutorial-clone-table<br />CREATE TABLE AS CLONE OF: https://learn.microsoft.com/sql/t-sql/statements/create-table-as-clone-of-transact-sql?view=fabric<br /><br />Ambika Jagadish - Product Manager for Warehouse in Microsoft Fabric<br />www.linkedin.com/in/ambikajagadish
Fabric Espresso: Table clone in Warehouse within Microsoft Fabric
Welcome to the fourth video in our How To series for Real-Time Analytics in Microsoft Fabric!<br /><br />In this video, Guy Reginiano, a Product Manager for Synapse Real-Time Analytics in Microsoft Fabric, will show you how to get data from Azure Event Hubs into a Real-Time Analytics KQL database in Microsoft Fabric.<br /><br />00:07 Introduction<br />00:25 Basic definitions<br />01:12 Event Hubs ingestion demo<br />06:34 Interact with the ingested data using KQL<br />07:54 Create a Cloud Connection in Fabric<br />10:24 Wrap-Up<br /><br />#microsoftfabric #synapserealtimeanalytics
Synapse Real-Time Analytics: Stream data from Event Hubs into a KQL database for powerful analytics
Welcome to our Fabric Espresso series! In this video Bogdan joins Stijn to talk about Microsoft Fabric and what place Azure Synapse has in all of this. We will talk a bit more deep on the engine that was created for Fabric Warehouse and how it compares to Dedicated SQL Pools!<br /><br />Polaris white paper: https://www.vldb.org/pvldb/vol13/p3204-saborit.pdf<br /><br />Bogdan Crivat - VP Synapse Analytics<br />https://twitter.com/bogdanC_guid<br />https://www.linkedin.com/in/bogdanc/<br /><br />Stijn Wynants - Senior Program Manager<br />https://www.linkedin.com/in/stijn-wynants-ba528660/<br />https://sql-stijn.com/<br />https://twitter.com/SQLStijn
Fabric Espresso: Will Fabric replace Azure Synapse?
Load More... Subscribe
This error message is only visible to WordPress admins

Cannot collect videos from this channel. Please make sure this is a valid channel ID.