Deepesh
Deepesh

Reputation: 5614

Sql Server Index on Bit fields

I am using Sql Server 2000 and want to know why we can not create index on bit fields?

Upvotes: 1

Views: 1592

Answers (2)

Martin Smith
Martin Smith

Reputation: 453608

Just a limitation of the product. SQL Server 2005+ does allow this.

Because of the Tipping Point a single column bit index is unlikely to be very useful unless the values are heavily skewed (a scenario for which filtered indexes in 2008 can help)

Still - could be useful as part of a composite covering index though.

Upvotes: 6

Moe Sisko
Moe Sisko

Reputation: 12041

I would guess this is by design. A bit field can only have 1 of 2 values, so it would not be selective enough for an index to be useful.

Upvotes: 3

Related Questions