|
Archives of the TeradataForumMessage Posted: Tue, 11 Sep 2007 @ 13:18:23 GMT
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 ViPS, Inc.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||