Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How many indexes can we create on a SQL Server table according to the SQL Server versions?

Tags:

sql-server

How many many indexes can we create on one table in each of the SQL Server versions, including clustered and nonclustered indexes.

like image 438
amol kekan Avatar asked Jan 27 '26 22:01

amol kekan


1 Answers

According to the "Maximum Capacity Specification" page for SQL Server, you can have exactly ONE clustered index, and up to 999 nonclustered indices per table.

https://learn.microsoft.com/en-us/sql/sql-server/maximum-capacity-specifications-for-sql-server?view=sql-server-2017

This is valid for versions back to SQL Server 2014 (can't find anything for older versions - you should not use those anymore, any way!), and for both 32- and 64-bit versions, and does not seem to change from edition to edition (Express, Web, Standard, Enterprise).

But I agree with @scsimon - if you get even remotely close to that limit - there's a huge design smell in your solution! Something is very bad if you even approach that many indices on a single table ....

like image 128
marc_s Avatar answered Jan 29 '26 11:01

marc_s



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!