Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Char vs Varchar - Performance
Message
 
 
À
01/02/2005 10:51:46
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00982531
Message ID:
00982672
Vues:
25
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.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform