May 16, 2009 at 1:17 am
HI,
All
I have table with columns
id primary key int,bitcolumn1 bit,bitcolumn2 bit,bitcolumn3 bit,bitcolumn4 bit,...,...bitcolumn50 bit.
I want suggestion to create indexes to gain performance.
on which column it should be there.(Table contains 2 millions of records)
generally data access through id and any bitcolumn:
select bitcolumn1 where id=1;
select bitcolumn1 where bitcolumn1=1/0;
same update query to change a bit value.
My reason to post this topic is to know index on binary columns
May 16, 2009 at 2:56 am
Indexes on bit columns work the same way as indexes on any other column type. Have a look at this blog post.
http://sqlinthewild.co.za/index.php/2009/01/19/index-columns-selectivity-and-equality-predicates/
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply