9

When should I choose one or the other? What are the implications regarding space and (full-text) indexing?

BTW: I'm currently using SQL Server 2005 planing to upgrade to 2008 in the following months.

Thanks

Matt
  • 14,906
  • 27
  • 99
  • 149
Julio César
  • 12,790
  • 10
  • 38
  • 45

2 Answers2

13

The new (max) fields make it a lot easier to deal with the data from .NET code. With varbinary(max), you simply set the value of a SqlParameter to a byte array and you are done. WIth the image field, you need to write a few hundred lines of code to stream the data into and out of the field.

Also, the image/text fields are deprecated in favor of varbinary(max) and varchar(max), and future versions of Sql Server will discontinue support for them.

Irshad
  • 3,071
  • 5
  • 30
  • 51
Eric Z Beard
  • 37,669
  • 27
  • 100
  • 145
4

Once you put it in the blob, it's going to be difficult to be used for normal SQL comparison. See Using Large-Value Data Types.

Eugene Yokota
  • 94,654
  • 45
  • 215
  • 319