I am very new to teradata and have TD query as:
CREATE SET TABLE tablename(
fieldname DECIMAL(15,2) COMPRESS (0.00 ,50.00 ,46.00 )
What the value will be entered in this fieldname if i insert 1000.594 in the table?
What is the difference between values of DECIMAL(15,2) and DECIMAL(15,2) COMPRESS (0.00 ,50.00 ,46.00 ) ?
COMPRESSION is a teradata feature which allows the users to compress the most commonly appearing values in once column. Physically, the compressed values are stored in table header and not reapeating in each row thus saving some space. If a value other than the compressed list comes with a row, that takes its normal allocated space...
COMPRESS (.....) clause defines the values that are compressed.
In your case only 0.00, 50.00 and 46.00 are the values that will be compressed, so if you enter 1000.594 it is not compressed but consumes all the allocated bytes.
Yep ,as Qaisar said,If the compress the column values which they are repeating and keep those columns as compress,so we can save some space .We would observe the saved space ,If it is a huge data or there more repeating column values exist.
Here nothing much difference , DECIMAL(15,2) are not compressing or not saving space and DECIMAL(15,2) COMPRESS (0.00 ,50.00 ,46.00 ) are compressing with repeated columns or are saving some space,Thats all
Can you let me know what is the checksum and checksum default which is specified while creating a table.What is the use of it and how does it perform.