Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Varchar vs char
Message
De
03/11/1999 09:04:04
 
 
À
02/11/1999 17:18:39
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Divers
Thread ID:
00285417
Message ID:
00286051
Vues:
26
Thanks Mike!

Is there any beneifit or disadvantage to indexing on varchar() vs char() that you are aware of?

Ken


>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
Ken B. Matson
GCom2 Solutions
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform