Sql Server Index on Bit fields

只愿长相守 提交于 2019-12-11 07:38:40

问题


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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/7607332/sql-server-index-on-bit-fields

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!