IBM® Informix® 12.10

Updating spatiotemporal indexes

You can update spatiotemporal search indexes manually or automatically and choose how much of the index to build.

Scope of the index build

By default, loading and indexing spatiotemporal data is incremental so that only data with time stamps that are after the time stamps in the subtrack table are processed.

However, with some indexing methods you can drop and re-create a subtrack table and its indexes. Rebuild the subtrack table and its indexes to perform any of the following actions:

  • Update data in the subtrack table.
  • Add data that is before the latest time stamps in the subtrack table.
  • Remove older data that you no longer need to query.
  • Attach or detach rolling window intervals.

You can change the indexing time range by running the STS_SubtrackAlterFirstTimeStamp and the STS_SubtrackAlterLagToCurrent functions. When you run the STS_SubtrackAlterFirstTimeStamp function, the subtrack table and its indexes are rebuilt.

Automatic scheduled indexing

You can define a Scheduler task to run automatically at the specified frequency to load and index new data. Set the first time stamp to process, the interval from the current time to avoid processing, the number of Scheduler tasks to run in parallel, and the first time to start the task.

To configure a Scheduler task when you create the subtrack table, run the STS_SubtrackCreate function and include Scheduler parameters.

To start or alter a Scheduler task at any time after you create the subtrack table, run the STS_SubtrackAlterProcessing function.

Automatic indexing linked to loading time series data

You can set the time series loader functions to trigger the loading and indexing of spatiotemporal data as new time series data is saved to disk.

To incrementally build the spatiotemporal index for the time series instances that received new data, add 512 to the value of the writeflag parameter in the TSL_Commit, TSL_FlushAll, or TSL_Flush function.

To rebuild the spatiotemporal index for the time series instances that received new data, add 1024 to the value of the writeflag parameter in the TSL_Commit, TSL_FlushAll, or TSL_Flush function.

Manual indexing

You can update a spatiotemporal index manually at any time, regardless of whether automatic indexing is configured.

To load and index spatiotemporal data for the subtrack table, run the STS_SubtrackBuild function. Set the flags parameter to 1 to incrementally build the index, or to 2 to rebuild the index.

To load and index spatiotemporal data for a specific time series instance, run the STS_SubtrackUpdate function. Set the flags parameter to 1 to incrementally build the index, or to 2 to rebuild the index.


Examples exchange | Troubleshooting

To find the PDF, see Publications for the IBM Informix 12.10 family of products.
For the release notes, documentation notes, and/or machine notes, see the Release Notes page.