Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Varchar vs char
Message
De
02/11/1999 17:18:39
 
 
À
02/11/1999 08:56:16
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Divers
Thread ID:
00285417
Message ID:
00285784
Vues:
17
Ken

See inline...

>Is it accurate to say that MOST character fields should be of the varchar() type as opposed to char()?
>
>Is there any benefit or disadvantage to using one or the other? Does this answer change if the field is used for an index?

In 6.5 there was a definite advantage to not using variable length data types. Variable length data types seriously limited SQL Server's options for updating data.

In 7.0, MS has completely reworked the storage manager. I believe that I read somewhere that it was better to use variable length data types because it limited the size of the row, meaning more rows per page, meaning more data read in a single page I/O.


>I am currently adopting the practice of using varchar() for fields that have a lot of length possibility such as name, address, etc. and char() if all or most entries will be fairly close in length. Does this sound like a good system?

That is the same methodology that I use.

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform