Question 1: The below 3 statements are valid; I just want to know what is the difference in compression process in Teradata DB.
Question 2:How to check ,weather compression table applied well or not?
1) First two examples compress only NULL.
Third one compresses the default value and four others, in addition to NULL.
2) The obvious way is to create two copies of the table, with and without compression, and compare the space used.
Or you could count the occurrences of the compressed values. You save space (8 bytes, in this case) for every value compressed, vs. adding at most 1 additional presence byte for every row (or no additional byte if there are enough spare presence bits left in the rowheader).