[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

Performance Difference using tinyint instead of bit

ataylor

3/30/2007 12:02:00 AM

Hi-

We recently changed one table (200,000 records) to filter on a tinyint
instead of a bit. We're experiencing a lot of timeout problems, but
can't narrow down the cause. Does anyone have experience with a
performance hit from filtering on a tiny int field instead of a bit
field? Neither column is indexed.

1 Answer

Andrew J. Kelly

3/30/2007 12:41:00 AM

0

If you don't have an index and that is the only Column in the WHERE clause
there is no choice but to scan the entire table. This is equally true for a
bit or a tinyint. My guess would be that you have some fragmentation due to
the alter table that you may not have had before. Can you post the DDL
including indexes and the output of DBCC SHOWCONTIG on the clustered index?

--
Andrew J. Kelly SQL MVP

<ataylor@regonline.com> wrote in message
news:1175212902.660914.301940@l77g2000hsb.googlegroups.com...
> Hi-
>
> We recently changed one table (200,000 records) to filter on a tinyint
> instead of a bit. We're experiencing a lot of timeout problems, but
> can't narrow down the cause. Does anyone have experience with a
> performance hit from filtering on a tiny int field instead of a bit
> field? Neither column is indexed.
>