Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 16 Jan 2012 @ 15:04:54 GMT


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


Subj:   Re: Compress Null value
 
From:   td newsgroup

Try the following

     create table null_compress_ 1
     as
     (select calendar_date, cast(Null as CHAR(2000)) as NULLTEST from \
     sys_calendar.calendar) with data
     unique primary index (calendar_date);

     create table null_compress_ 2
     as
     (select calendar_date, cast(Null as CHAR(2000)) as NULLTEST from \
     sys_calendar.calendar) with data
     unique primary index (calendar_date);

     alter table null_compress_ 1
     add NULLTEST compress null;

     select tablename, sum(currentperm)
     from dbc.allspace
     where tablename like 'null_compress _ %'
     group by 1
     order by 1

at least I get

     null_compress_1       2.66803*10^6
     null_compress_2       2.98366*10^8

which seems a reasonable difference...

Null is a value as all and if you have an integer field defined and you store a null in it it consumes 4 byte...


Ulrich

www.data2knowledge.de



     
  <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: 27 Dec 2016