开发者

Sql Server Index on Bit fields

开发者 https://www.devze.com 2023-04-09 19:31 出处:网络
I am using Sql Server 2000 and want to know why we can not create index on 开发者_JAVA技巧bit fields?Just a limitation of the product. SQL Server 2005+ does allow this.

I am using Sql Server 2000 and want to know why we can not create index on 开发者_JAVA技巧bit fields?


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号