Indexing

GiST and SP-GiST indexes can be created for table columns of temporal cells. An example of index creation is as follows:

CREATE INDEX Trips_Cells_SPGist_Idx ON Trips USING SPGist(Cells);

The GiST and SP-GiST indexes store the bounding box for the temporal cells, which is an stbox, as all spatiotemporal types: the extent of the cell boundaries, geodetic for H3 and S2 cells and planar for QUADBIN cells, together with the time period.

Each operator class carries the name of the temporal type it indexes, so a th3index column takes th3index_rtree_ops for GiST and th3index_quadtree_ops or th3index_kdtree_ops for SP-GiST, and the tquadbin and ts2cell names likewise. The quadtree class is the SP-GiST default and the k-d tree class is named explicitly. A B-tree and a hash operator class are defined as well, ordering and hashing by the underlying temporal value.

A GiST or SP-GiST index can accelerate queries involving the following operators:

These operators work on bounding boxes, not the entire values.