varchar character limit

Post Reply
jkj2001
Posts: 142
Joined: Fri Mar 29, 2002 1:39 pm

varchar character limit

Post by jkj2001 »

It's my understanding that if you create, say, a varchar(255) field in a table, you can still add 256+ characters to it; the field will expand depending on need.

However, when does this "dynamic expansion start to break down? A thousand characters? A million?

We're debating whether to make a field of ours a blob or varchar, and this is one of the factors we'll take into account. Thanks for the advice.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

varchar character limit

Post by mark »

It doesn't break down. A varchar may be as big as a blob, 1 gigabyte max. A varchar field does not use any more space than needed. About the only time the length spec of a varchar field even matters is if that field is used as an aux field in a combined metamorph index.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

varchar character limit

Post by John »

When choosing between varchar and blob it is much more important to consider how the data will be accessed. If for the most part the data will not be read, e.g. searched with an index, but not selected, then a blob can be helpful.
John Turnbull
Thunderstone Software
Post Reply