All Forums Database
n_shashi 15 posts Joined 08/11
07 Mar 2014
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

dnoeth 4628 posts Joined 11/04
08 Mar 2014

Compression for TIME and TIMESTAMP was introduced in TD14.10

Dieter

n_shashi 15 posts Joined 08/11
10 Mar 2014

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')
           )

tran.nam 1 post Joined 04/12
20 Jun 2014

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

12 Mar 2015

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' )
;

Fred 1096 posts Joined 08/04
13 Mar 2015

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.
 

16 Mar 2015

Thank you.  Really appreciate answer. 

You must sign in to leave a comment.