Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Varchar vs char
Message
From
02/11/1999 17:18:39
 
 
To
02/11/1999 08:56:16
General information
Forum:
Microsoft SQL Server
Category:
Database design
Title:
Miscellaneous
Thread ID:
00285417
Message ID:
00285784
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform