Friday, March 9, 2012

NULL/Varchar and extra bits

How may extra bits does a NULL column contain.
And how many extra bits does a varchar column contain.

(I 've worked with Ingres and in that environment it both needed 2 extra
bits)

Bye,

Arno de Jong, The NetherlandsSee inline

"A.M. de Jong" wrote:
> How may extra bits does a NULL column contain.

None. There will always be one bit for each column in the NULL-bitmap,
regardless of whether the column contains or allows NULLs.

> And how many extra bits does a varchar column contain.

Each varchar column uses a 2 byte size indicator. A char column does not
have this overhead because of its fixed size.

Gert-Jan

> (I 've worked with Ingres and in that environment it both needed 2 extra
> bits)
> Bye,
> Arno de Jong, The Netherlands|||Hi Gert-Jan,

Can we continue in dutch; privately ??

Arno de Jong

"Gert-Jan Strik" <sorry@.toomuchspamalready.nl> wrote in message
news:3FA8DB33.A158A721@.toomuchspamalready.nl...
> See inline
> "A.M. de Jong" wrote:
> > How may extra bits does a NULL column contain.
> None. There will always be one bit for each column in the NULL-bitmap,
> regardless of whether the column contains or allows NULLs.
> > And how many extra bits does a varchar column contain.
> Each varchar column uses a 2 byte size indicator. A char column does not
> have this overhead because of its fixed size.
> Gert-Jan
> > (I 've worked with Ingres and in that environment it both needed 2 extra
> > bits)
> > Bye,
> > Arno de Jong, The Netherlands

No comments:

Post a Comment