Index on BIT with NULLABLE column? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Index on BIT with NULLABLE column?


I don’t think it’s a good idea to have index on this column. Anyone disagree? I am trying to optimize the indices on existing tables and seen some of these indiced created on these BIT column.
Name
———
Dilli Grg (1 row(s) affected)
you *could* have it as a covering index. We do have some status columns like that and have seen some improvment if the column is included as a part of covering index. In 2005 there is a new feature called "INCLUDE" which showed even better improvement than a covering index. I would recommend trying this new INCLUDE clause if you are using 2005. ***********************
Dinakar Nethi
SQL Server MVP
***********************
http://weblogs.sqlteam.com/dinakar/
quote:Originally posted by ndinakar you *could* have it as a covering index. We do have some status columns like that and have seen some improvment if the column is included as a part of covering index. In 2005 there is a new feature called "INCLUDE" which showed even better improvement than a covering index. I would recommend trying this new INCLUDE clause if you are using 2005. ***********************
Dinakar Nethi
SQL Server MVP
***********************
http://weblogs.sqlteam.com/dinakar/
Hi Dinakar,
Thanks for the recommendation. I will still have to look at that "INCLUDE" feature.
Name
———
Dilli Grg (1 row(s) affected)
What is the record count on this table? Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
quote:Originally posted by satya What is the record count on this table? Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
About 8-10 million records.
Name
———
Dilli Grg (1 row(s) affected)
Then as you have decided Dinakar’s proposal go for it with covering indexes & using INCLUDE feature too. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it.
]]>