Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VarChar
Message
General information
Forum:
Microsoft SQL Server
Category:
Database design
Title:
Miscellaneous
Thread ID:
01110397
Message ID:
01110404
Views:
18
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform