February 26, 2008 at 3:25 pm
I have a general question. I have noticed that my current client has all their varchar columns in all of their 1100 tables set to varchar(8000). I realize that varchar is varialbe in length and will use only what is needed but does this effect how memory is allocated? Also, does it effect page reads, selects from the table or anything at all? I am just looking for an overall opinion on pros/cons on what they are doing? Thanks!
February 26, 2008 at 4:06 pm
Even the column is set to varchar(8000), it will not take up 8000 bytes, it depends on the actual size of the data.
February 26, 2008 at 4:18 pm
That looks like laziness on their part. They obviously didn't want to take the time to analyze the data that would be stored in the varchar fields so that they could be sized appropriately, even if still defined as varchar fields.
😎
February 27, 2008 at 12:12 pm
Yes, agreed, definite laziness but initially when tables with lets say 20 varchar fields are created the initial page size is huge. However, just my opinion is not getting through to them and I've searched everywhere for any kind of documentation that would advise against this. Anyone know anything out there besides this forum thread 🙂
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply