Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
To varchar or Text?
Message
 
À
25/06/2001 13:34:40
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00523068
Message ID:
00525285
Vues:
18
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform