Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Tue, 24 May 2011 @ 21:40:19 GMT

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

Subj:   Re: Multi value compression and presence bits
From:   DWellman

Hi David,

Compressing 50 values may or may not be a good idea. It's a little more complex than just looking at the values.

Compressing 50 x CHAR(2) values will add @100 bytes to the table header ON EACH AMP Compressing 50 values will require 7 bits in the row header, so a maximum of 1 byte extra.

Assume you have 1 million rows in the table and 100 AMPs

Additional space is (approx):

100 x 100 = 10000 bytes in table header

1000000 x 1 = 1000000 bytes for presence bits

Total = 1010000 bytes =~ 1MB

Space saving:

1000000 x 2 = 2000000 bytes =~ 2MB

Basically you're saving with more rows but losing with more AMPs.

Possibly the 'sweet spot' for this calculation is when you can use all of the 'spare' presence bits but do not add to the row header length.

Does that help ?



Ward Analytics Ltd - Information in motion (www.ward-analytics.com)

  <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