Purpose
The TD_TIMESERIES_RANGE macro finds the valid ranges of the TD_TIMECODE and TD_SEQNO columns in a PTI table.
Syntax
Syntax Elements
- DBC
- The name of the database where the function is located.
- DBname.TSTable
- The name of the database and PTI table.
Usage Notes
Use this macro to show the upper limit of values that can be stored in the TD_TIMECODE and TD_SEQNO columns of a PTI table. Sensor data can flow rapidly into a system and cause a PTI overflow. This macro provides available space information for planning purposes and can also be helpful in resolving out of range errors.
Example: Get the Valid Range of Values for the TD_TIMECODE and TD_SEQNO Columns
Create table MyDB.ocean_buoy ( TD_TIMEBUCKET BIGINT NOT NULL GENERATED SYSTEM TIMECOLUMN, TD_TIMECODE TIMESTAMP(6) NOT NULL GENERATED TIMECOLUMN, TD_SEQNO INTEGER NOT NULL GENERATED TIMECOLUMN, BuoyID INTEGER, Temperature INTEGER NOT NULL) PRIMARY TIME INDEX (TIMESTAMP(6), DATE '2016-01-01', HOURS(1), SEQUENCED); exec DBC.TD_TIMESERIES_RANGE('MyDB.ocean_buoy'); TD_TIMECODE_RANGE ---------------------------------------------------- TD_TIMECODE BETWEEN TIMESTAMP '2016-01-0100:00:00.000000+00:00' AND TIMESTAMP '2030-08-1214:23:21.842737+00:00' TD_SEQNO_RANGE ---------------------------------------------------- TD_SEQNO BETWEEN 1 AND 20000 -- you can specify the table name in the macro and will get the same output as above example. exec DBC.TD_TIMESERIES_RANGE('ocean_buoy');