Afficher un message
Vieux 01/04/2008, 23h38   #2
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: from 'image' to 'varbinary(max)'

Gilad (gilad.kapel@gmail.com) writes:
> I moved to SQL Server 2005 (from 2000) and noticed there is a better
> variable to deal with binary arrays.
> I hava a table that hold 9 columns of images (BLOB). each array has a
> different size and can be larger than 4k.
> I've changed the column data type from image to varbinary(max).
> After the chnage, the size of the table grew from 22MB to 26MB.
> Any idea why? I though the new variable should be better.


varbinary(MAX) is better than image, because you can work with just like
you work with regular varbinary, while image has a lot of restrictions
and drives you to complex operations like READTEXT and WRITETEXT.

I can't tell why your table increased in size, but since 26 MB is still
a small table, I would not bother.



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
 
Page generated in 0,13955 seconds with 9 queries