[dba-SQLServer] Pointless Indexes?

Jim Lawrence jlawrenc1 at shaw.ca
Mon Aug 11 16:04:57 CDT 2008


Hi Arthur:

I must admit I use a byte for this type of column and it works just fine... 

Jim

-----Original Message-----
From: dba-sqlserver-bounces at databaseadvisors.com
[mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur
Fuller
Sent: Monday, August 11, 2008 1:01 PM
To: Discussion concerning MS SQL Server
Subject: Re: [dba-SQLServer] Pointless Indexes?

You're precisely correct, that is what that column (called IsActive) does,
but some of the reading I've done suggests that a) you can't index a bit
column even in a compound index -- although it is listed in the indexed
columns so this part is especially confusing; and b) that given an
approximately 50-50 ratio of Yes and No in said column, even if indexed the
optimizer will prefer a table scan. I'm just beginning to learn about
Execution Plan etc. so I don't know whether I'm misreading the articles or
the evidence or both.

A.

On Mon, Aug 11, 2008 at 4:35 PM, Jim Lawrence <accessd at shaw.ca> wrote:

> Hi Arthur:
>
> I would not know why your particular client would index a bit column but I
> use that a lot of times as a super fast group index for inactive and
active
> records in any DB.... as you know account transactions can never be
> deleted...
>
> Jim
>
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com




More information about the dba-SQLServer mailing list