Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Char(100) field VS Text
Message
 
 
À
19/04/2012 11:11:23
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01542085
Message ID:
01542124
Vues:
21
>>Can you show your statement? This error message means that TEXT type can not be used for exact match. Varchar field can and should be used.
>
>Ok, now I am confused. I did the same test again and did not get the error this time. So, on this second simulation, searching for exact value on a VarChar(10) field worked. So, this brings it down to using VarChar(100), assuming 100 characters would be the maximum to support, and would save a bunch of disk space on the database because the first 26 million records won't be affected and for the upcoming ones which would be empty or containing not that much characters. This is as good as long as I do not need the unicode support.
>
>Thanks

In SQL 2008 I suggest to also look into row and page compression. Check
http://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/compressing-data-with-uniqueidentifier-columns (this blog also touches the general idea of compression).
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform