Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
The only real downside to varchar is if you initially store a value in a varchar column with say, 10 characters and later change this value to say, 20 characters, the value gets fragmented into two separate physical areas on disk. Furthermore, if you change this same value to 30 characters you now have three non-contiguous areas that contain the value for the column. The database needs to do more work to construct this value, thereby causing a performance hit.
So, with this said, if you know a column will rarely, if ever, change, then varchar is a good choice.
HTH
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement