Tessellation | Geospatial Data Types | Teradata Vantage - 17.10 - Tessellation - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Geospatial Data Types

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

Tessellation and tessellation functions can improve database performance with geospatial data when geospatial indexes are not available. With the introduction of geospatial indexing in , tessellation usually is not necessary. Although Teradata geospatial indexing implements a geospatial nested join capability, there are other types of geospatial joins which may be better suited for indexing certain classes of geospatial objects. (For more information on geospatial nested joins, see Geospatial Predicates and the Optimizer.) For this reason, there may be times when tessellation may yield better performance for queries involving geospatial data, rather than using a geospatial index driven nested join. Tessellation can also be used when a geospatial index is not available.

Tessellation remains available for instances when tessellation is a better choice than using a geospatial index. This section describes the tessellation functions and methods that are still available in Vantage.

The SELECT request shown in Methods Specific to the Subtype the ST_Geometry Type Represents specified a join condition of streetShape.ST_Within(cityShape) = 1 to find all of the streets within a table of cities. To analyze the join without the aid of geospatial indexes, Vantage needs to check every street against every city, which is a cross product. This can be costly for geospatial types, especially since they can be complex and irregular in shape. A lot of comparisons will be done even if the geospatial objects are not close to each other.

Tessellation is a technique where the object universe is described as a grid with a specified grid size. The tiles within the grid are referred to as cells. Grids can be multilevel, with each level a finer granularity.

Here is an example of a single-level grid (of unspecified size) that contains 16 cells.

Tessellation: Single-level grid with 16 cells

To use tessellation, the geospatial objects (for example, streets and cities) of the join are converted into minimum bounding rectangles (MBRs) and placed within this grid (multilevel if desired). During a join operation, instead of comparing every street to every city, only the streets and cities that lie within the same grid cells are compared. The query can use a tessellation method on the geospatial objects to return the cell ids and grid level where the geospatial objects lie.

The sections that follow describe the tessellation functions and methods available in the database.