TSDropPatternIndex function

The TSDropPatternIndex function drops the specified pattern matching index.

Syntax

TSDropPatternIndex (
                ts              TimeSeries,
                table_name      LVARCHAR,
                key_value       LVARCHAR,
                field_name      LVARCHAR,
                search_method   INTEGER)
returns INTEGER;
ts
The time series value for the specified primary key.
table_name
The name of the time series table.
key_value
The value of the primary key for the time series instance. If the primary key consists of multiple columns, concatenate the values.
field_name
The name of the field in the TimeSeries data type that is indexed.
search_method
The pattern match method. 0 = Subsequence pattern match. 1 = Whole pattern match.

Returns

  • 0 = The index was dropped.
  • An error.

Example

The following statement drops the pattern matching index on the value1 field in the TimeSeries subtype for the time series instance that has a primary key value of 1000:

EXECUTE FUNCTION TSDropPatternIndex(ts1, 'tsdata', 1000, 
           'value1', 'idx_metatype=0');