Forum Discussion
MixMalvarkie
Jun 06, 2024Copper Contributor
Creating an Index with a lot of Columns
Hi all. I have been working on SQL Environment that are really not well due to legacy system mixed with new systems. Need to ask bit of stupid question. I have run few different SQL Scripts to recom...
olafhelper
Jun 06, 2024Bronze Contributor
MixMalvarkie , so many columns in a index are not usually, but for specially use case possibly, like indexex for flexible search over several entity properties.
Keep in mind, an index entry can have maximum size limitation, see
CREATE INDEX (Transact-SQL) - SQL Server | Microsoft Learn
=> column
"The maximum allowable size of the combined index values is 900 bytes for a clustered index, or 1,700 for a nonclustered index. The limits are 16 columns and 900 bytes for versions before SQL Database and SQL Server 2016 (13.x)."