Subject Re: [firebird-support] Column change from varchar to blob makes minimal difference to table size?
Author Martijn Tonies
Hello Mitch,

> I have a 38,000 row table with a column that is currently
> varchar(2500). Most of the content is 0-100 characters, but perhaps
> 20% uses about 500 characters or more. I want users to be able to
> store up to about 2,500 characters if necessary.
>
> I thought perhaps storage size would be more efficient if the column
> was changed to text blob type. However when I change it there is
> almost no change in table size. Is this correct behaviour?

Well, for starters, Firebird stores only the actual characters, so it won't
store 2400 spaces if you only use 100 characters. Next, Firebird stores
the information in RLE format, so it's smaller still.

As for changing it to a BLOB, this means that the data will be stored
in a different part of the database if the data is too large for the
datapage,
if not, it will be an "inline blob", on the data page with the rest of the
table
data.

So I guess there's not much of a difference there...

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Sybase
SQL Anywhere, Oracle & MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com