Home All Groups Group Topic Archive Search About
Author
4 Aug 2006 5:12 PM
skg
i have a table with 5 million rows. It has a binary column. I am curious
to know if i do a group by on that column, will it be faster if i have it as
varbinary rather than binary

TIA
thx

Author
4 Aug 2006 5:17 PM
Steve Kass
The best way to find out is to try both options and see.  It probably
depends on the average length of the items stored.  Unless you find a
a large difference between the choices, you should probably store
the data in whichever format makes the most sense for the information
it represents.  With binary, everything will be right-padded with 0x00
bytes, so if a trailing 0x00 is meaningful, binary is not going to be
useful.

Steve Kass
Drew University

skg wrote:

Show quote
>i have a table with 5 million rows. It has a binary column. I am curious
>to know if i do a group by on that column, will it be faster if i have it as
>varbinary rather than binary
>
>TIA
>thx
>
>

>
Author
4 Aug 2006 5:29 PM
skg
Thanks!! Steve.
Yes i see the right padding hence i was concerned.
Thanks for your input.
Show quote
"Steve Kass" <sk***@drew.edu> wrote in message
news:%23SEMan%23tGHA.4544@TK2MSFTNGP04.phx.gbl...
> The best way to find out is to try both options and see.  It probably
> depends on the average length of the items stored.  Unless you find a
> a large difference between the choices, you should probably store
> the data in whichever format makes the most sense for the information
> it represents.  With binary, everything will be right-padded with 0x00
> bytes, so if a trailing 0x00 is meaningful, binary is not going to be
> useful.
>
> Steve Kass
> Drew University
>
> skg wrote:
>
>>i have a table with 5 million rows. It has a binary column. I am curious
>>to know if i do a group by on that column, will it be faster if i have it
>>as varbinary rather than binary
>>
>>TIA
>>thx
>>
>>

AddThis Social Bookmark Button