HELP INDEX with a PTI Table Example | Teradata Vantage - Example: HELP INDEX with a PTI Table - Advanced SQL Engine - Teradata Database

Time Series Tables and Operations

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
cxa1555383531762.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1208
lifecycle
previous
Product Category
Teradata Vantage™

Below is the table definition for the example.

CREATE SET TABLE DB1.tstab1, NO FALLBACK,
 NO BEFORE JOURNAL,
 NO AFTER JOURNAL,
 CHECKSUM = DEFAULT,
 DEFAULT MERGEBLOCKRATIO
 (
 TD_TIMEBUCKET BIGINT NOT NULL GENERATED SYSTEM TIMECOLUMN ,
 TD_TIMECODE TIMESTAMP(6) NOT NULL GENERATED TIMECOLUMN ,
 TD_SEQNO INT NOT NULL GENERATED TIMECOLUMN,
 c1 INTEGER,
 c2 INTEGER,
 c3 VARCHAR(10) CHARACTER SET LATIN NOT CASESPECIFIC)
 PRIMARY TIME INDEX (TIMESTAMP(6), DATE '2015-05-02', HOURS(1), COLUMNS(c1, c2), SEQUENCED) ;
This statement displays the index attributes for tstab1:
HELP INDEX tstab1;
Following is the help output for the primary index of the PTI table tstab1, which includes the TD_TIMEBUCKET, c1, and c2 columns. TimeZero ‘2015-05-02’ indicates that the time series for the table tstab1 started on May 2, 2015 and Timebucket Hours(1) shows that each time series bucket duration is one hour, that is, HOURS(1).
                   Unique? N
   Primary//or//Secondary? P
              Column Names TD_TIMEBUCKET,c1,c2
                  Index Id 1
         Approximate Count 0
                Index Name ?
 Ordered//or//Partitioned? P
                CDT Index? N
     Index Dictionary Name ?
            Index SQL Name ?
        Index Name UEscape ?
                  TimeZero '2015-05-02'
                Timebucket Hours(1)