Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 11 Sep 2007 @ 13:18:23 GMT


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


Subj:   Re: MULTI VALUE COMPRESSION
 
From:   Kamin Shah

Ram,

Not sure what you are trying to get to. If the value has been marked for compression, Teradata is going to compress it.

You can get the compressed values from the 'CompressValueList' column in the dbc.columnsx view

You can do a count distinct on the column which the table has marked for compression and only print those out which have been marked for compression.

So basically the first query below gives you the compress value list of the each column which has been marked for compression:

     SELECT COLUMNNAME, COMPRESSVALUELIST
     FROM DBC.COLUMNSX
     WHERE DATABASENAME = 'MYDB'
     AND TABLENAME = 'MYTABLE'
     AND COMPRESSIBLE = 'C';

You can use the output in a where condition on the actual table (MYDB.MYTBL) and run a distinct count on the CompressValueList from above and get what you are looking for.

You can also combine the 2 queries and get what you are looking for.


Hope this helps!

Kamin Shah
Systems Engineer

ViPS, Inc.



     
  <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