When is a clustered index necessary?

AFAIK SQL table indexes are designed to improve query speed, so they are not absolutely necessary. However, SQL Azure for some reason requires that each table has a clustered index, so I assume there are times when an index is needed.

What can be when a clustered index is absolutely necessary and why?

+4
source share
2 answers

The absence of a clustered index implies a completely different storage model for the table, namely the heap table. I suspect that the Azure SQL team simply did not do this, and therefore the tables should be stored in the β€œnormal” way.

This article describes some of the pros and cons of heap tables and clustered tables.

+4
source

SQL Azure requires clustered indexes due to replication on the backend. Here is a MSDN blog reference article that lists some technical details:

http://blogs.msdn.com/b/sqlazure/archive/2010/05/12/10011257.aspx

+1
source

Source: https://habr.com/ru/post/1385325/


All Articles