COMPRESSION for TIMESTAMP field in TD14

Database
Enthusiast

COMPRESSION for TIMESTAMP field in TD14

Hi,

  Can we compress Timestamp field in TD14 (I know that Timestamp fields for only NULL values can be compressed in earlier versions). If yes, can the syntax also be provided?

Thanks for the help

6 REPLIES
Junior Contributor

Re: COMPRESSION for TIMESTAMP field in TD14

Compression for TIME and TIMESTAMP was introduced in TD14.10

Enthusiast

Re: COMPRESSION for TIMESTAMP field in TD14

Thank you Dieter for response.

I was confused because when I ran below stmnt in TD14.00, it threw an error' Compressed value incompatible with type of column END_TS.' 

Actually I was expecting an error msg like 'Illegal operation' or msg like 'Compression for Timestamp is not valid in TD14.00'

CREATE MULTISET TABLE CMPRS_SMPLE ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

     CO_ID SMALLINT NOT NULL,

           END_TS TIMESTAMP(6)  COMPRESS('9999-12-31 23:59:59.999999')

           )

Re: COMPRESSION for TIMESTAMP field in TD14

Hi Shashi,

Not sure if you have fixed this problem or not. But for other readers I found this works.

CREATE MULTISET TABLE CMPRS_SMPLE ,NO FALLBACK ,

     NO BEFORE JOURNAL,

     NO AFTER JOURNAL,

     CHECKSUM = DEFAULT,

     DEFAULT MERGEBLOCKRATIO

     (

     CO_ID SMALLINT NOT NULL,

           END_TS TIMESTAMP(6)  COMPRESS(TIMESTAMP '9999-12-31 23:59:59.999999')

           )

Cheers,

Nam

Re: COMPRESSION for TIMESTAMP field in TD14

Hi.  I tried the following and get an error.  Can you help with syntax?

EXPLAIN ALTER TABLE CWU_MRKT.TIFCST_WB_RTE_STN_DWL

ADD STN_DWL_MDN_D2S

COMPRESS ( INTERVAL '0 00:00:00.000000' )

;

Teradata Employee

Re: COMPRESSION for TIMESTAMP field in TD14

Multi-Value Compression is not supported for INTERVAL data types, at least through TD15.0

Also note that an INTERVAL constant must always include an interval qualifier, e.g. DAY TO SECOND, after the string.

Re: COMPRESSION for TIMESTAMP field in TD14

Thank you.  Really appreciate answer.