Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VarChar
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Divers
Thread ID:
01110397
Message ID:
01110404
Vues:
19
>Hi guys.
>
>It is my first message in SQL Server forum. I'm starting a new project, actually, my first project using SQL Server. So I have a lot of questions!
>
>The first question is about Char / VarChar:
>
>Name Char(50)
>Address VarChar(50)
>
>
>I choose Char for names because it is almost big and choose VarChar for address because (in Brazil) we have address like this: "Av 9 de Julho" and "Av Pedro de Alberto Gusmão dos Santos".
>
>My question: Did I do it right? Char and VarChar has the same performance when I add an index using this field as key?
>
>I have more questions, but I will add other thread!

I didn't saw any differences in persformance when I used char or varchar. But I didn't do any proper tests to confirm that. I personaly, prefer to use varchar(xx) for all string expressions that have a big differences in the length. That keeps DB smaller.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform