Example 1:

/*

 Query the first bit in the integer table

*/
declare @start as datetime
declare @finished as datetime
set @start = getdate()
select count(bits) 'INTEGER TABLE records with one bit set' 
    from tblSmall
    where (convert(int,([bits]/1)) % 2) =1
set @finished = getdate()
select datediff(ms,@start,@finished) ' milliseconds from start to finish'
go
INTEGER TABLE records with one bit set
-------------------------------------- 
2500

milliseconds from start to finish
----------------------------------
16

Example 2:

/*

 Query the first bit in the logical table table

*/
declare @start as datetime

declare @finished as datetime

set @start = getdate()

select count(bit1) 'LOGICALTABLE records with one bit set' from tblBig where bit1 = 1 set @finished = getdate() select datediff(ms,@start,@finished) ' milliseconds from start to finish' go
LOGICAL TABLE records with one bit set
--------------------------------------
2500

milliseconds from start to finish
----------------------------------
13