views:

134

answers:

3

I have a text field that can be 30 characters in length, however it can achieve around 2.000 characters.

For "future safety", it would be nice if this new column could support until 3.000 characters. I think the average size of this field is 250 characters.

Which SQL Server 2000 data type is better to increase performance and disk space?

+3  A: 

If your field is going to hold up to 3000 characters, you should probably make sure your datatype will allow for something that big. Design based upon your maximum, not your average.

TheTXI
Thanks for participating. Do you have a suggestion for a data type to use in this case?
Victor Rodrigues
@Victor: A varchar(3000) would give you the most flexibility. Using a text field makes querying the contents of the field more difficult.
TheTXI
Also, HLGEM made a good point in including Nvarchar to the mix if you plan on accepting characters more than just your standard set of characters (such as developing for multiple languages).
TheTXI
+6  A: 

Do you need unicode or nonunicode data? Use either varchar(3000) or nvarchar (3000). Don't use text or ntext as they become problematic to query or update.

To design for average length makes no sense.

HLGEM
+3  A: 

This sounds like the perfect case for VarChar. Are you doing any indexing on this field?

brian
I'll not have indexing for this field.
Victor Rodrigues