Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Char vs Varchar - Performance
Message
De
01/02/2005 11:03:11
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00982531
Message ID:
00982674
Vues:
25
Sergey,

>Prior to SQL 7.0 char column with Null value wouldn't take any space at all. Imagine some people surprise when there DB size went over the roof after converting to SQL 7. :)<

So, the same applies to SQL 2000? NULLs take up the whole space reserved for the datatype?

~~Bonnie



>Bonnie
><snip>
>
>>I wonder if what he says about storing NULL in a char(255) column is true? He says that it will take up the entire 255 characters ... I'm wondering how a NULL can take up 255 characters? I think he's wrong about that, but I don't know for sure how SQL stores such things. Maybe Sergey knows ...
>
>Prior to SQL 7.0 char column with Null value wouldn't take any space at all. Imagine some people surprise when there DB size went over the roof after converting to SQL 7. :)
>
>>I agree with what you say about when to use varchar instead of char. I do the same thing. My only question was if there were any performance issues, and it sounds to me, from Sergey's reply, that performance issues are probably negligible, which is the assumption I've been operating on all along.
>
>I would say that you're correct in your assumption.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform