Archives of the TeradataForum
Message Posted: Mon, 11 Aug 2003 @ 13:46:58 GMT
Subj: | | Re: Anyone used Multi-Value Compression? Experiences? |
|
From: | | Dieter Noeth |
Teradata is not doing any alignment, there's another reason for that byte.
> create table t (
> pi integer
> val smallint
> )
> unique primary index (pi)
> ;
>
> has a record consisting of
> header info: 14 bytes
> pi: 4 bytes
> val: 2 bytes
> thus totaling 20 bytes.
>
> Compressing Val to one of 63 distinct values led to
> header info: 15 bytes
> pi: 4 bytes
> val: 0 bytes
Compressing 63 values needs 6 bits plus 1 bit for each nullable column --> 8 bits. But the first Presence Byte only has 7 bits available,
so there must be a second Presence Byte for the 8th bit.
Dieter
|