Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To varchar or Text?
Message
 
To
25/06/2001 13:34:40
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
00523068
Message ID:
00525285
Views:
17
>Hi,
>
>If you are sure that a 'text' field will never exceed the 8000 byte varchar limit, are you better served creating varchar fields than text fields? I ask only because they are easier to manipulate than text fields.
>
>What are pros/cons of each? Any "best practice " here? Does answer change if you know field will be less than 4K? <2K?, <1K, etc?
>
>TIA,

Text fields are TERRIBLE. A table that contains a text field:
a) Can not issue a Union Distinct - thus forcing you to use a Union All
and then use asp logic to remove extraneous rows (very slow),
b) You can not index that field. On really large tables indexes are
critical to fast performance via "where" clause and "order by" clause.

I have worked on an app with text fields and they created tremendous problems.

The same goes for "bit" and "image" data types.
Carl R. Perkins
NJ5J Software Corp. http://www.nj5j.com
Previous
Reply
Map
View

Click here to load this message in the networking platform