Does Azure SQL support heaps or does it still require clustered indexes?

570 Views Asked by At

I have found lots of old documentation, like this page dating to 2010, about how SQL Azure requires clustered indexes and doesn't support tables which don't have them.

However, is that still the case, after 10 years? I cannot find any clear, more recent documentation.

This 2016 document talks about "Heaps (Tables without Clustered Indexes)" and applies to both SQL Server and Azure SQL Database. I would therefore guess that tables without clustered indexes are now supported. Is that the case? I would have liked to see it documented it more clearly.

Note this is not a generic software recommendation request - it is a very factual yes or no type of question.

3

There are 3 best solutions below

0
Conor Cunningham MSFT On

The 10-year old docs relate to the older "V11" architecture for SQL Azure. The "V12" architecture, which has been in place for many years, supports heaps, clustered indexes, in-memory tables, etc.

4
Yusuf-AIS On

SQL Azure requires every table to have at least one clustered index in order to maintain the replicas which are created out of the box for dbs.

0
Terence Stephens On

Yes, Heap Tables are currently supported. Documentation linked below shows them supported by Azure SQL Database (original scope of the question), SQL Server and Azure SQL Managed Instance.

https://learn.microsoft.com/en-us/sql/relational-databases/indexes/heaps-tables-without-clustered-indexes?view=sql-server-ver16