Subject Re: Constants
Author Adam
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
>
> Adam wrote:
> >
> > We have a config table.
> >
> > CREATE TABLE CONFIG
> > (
> > ID INTEGER,
> > NAME VARCHAR(50),
> > PREFERENCE BLOB SUB_TYPE 0 SEGMENT SIZE 1,
> > CONSTRAINT PK_CONFIG PRIMARY KEY (ID)
> > );
> >
> > Most of our preferences are Yes / No, so choose an appropriate segment
> > size for your needs.
> >
>
> Err, first, the segment size is advisory only and provided so higher
> level tools can preallocate buffers to hold the normal segment size.
> You can sent any size segment (up to 64Kb) to any blob regardless of
the
> declared segment size.

Thanks, didn't realise that.

> Second, each segment is stored with a two byte
> segment length, so you're storing three bytes for every significant
byte.
>
> Probably doesn't matter.
>

Nope, we have < 100 preferences, and any savings we made in database
size we would lose in application size. There is a one size fits all
preference save/load regardless of data type, which saves a
significant amount of code.

Adam