Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 11 Aug 2003 @ 13:46:58 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


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



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023