STS_SubtrackAlterFirstTimeStamp function

The STS_SubtrackAlterFirstTimeStamp function changes the first time stamp that is indexed.

Syntax

STS_SubtrackAlterFirstTimeStamp(
      subtrack_name                 VARCHAR(128),
      ts_data_first_timestamp       DATETIME HOUR TO SECOND DEFAULT NULL)
returns INTEGER
subtrack_name
The name of the subtrack table.
ts_data_first_timestamp
The first timestamp in the time series to index. Default is the origin of the time series.

Usage

Run the STS_SubtrackAlterFirstTimeStamp function to change the value of the ts_data_first_timestamp parameter, as set by the STS_SubtrackCreate function and to rebuild the subtrack table. You can use the STS_SubtrackAlterFirstTimeStamp function to purge old data that you no longer need for spatiotemporal searches.

Returns

0 = The first time stamp to index is changed.

An exception = An error.

Example

The following statement changes the first time stamp to index to the beginning of 2015:

EXECUTE FUNCTION STS_SubtrackAlterFirstTimeStamp(
        't_vehicle_subtrack', 
        '2015-01-01 00:00:00'::DATETIME YEAR TO SECOND);