17.00 - Example: HELP STATISTICS for a Geospatial Column - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Advanced SQL Engine
Teradata Database
Release Number
September 2020
Content Type
Programming Reference
Publication ID
English (United States)
Last Update

Consider the following COLLECT STATISTICS request, where o_spatial_location is a geospatial column.

       COLUMN o_orderdatetime,
       COLUMN o_orderkey,
       COLUMN o_spatial_location
     ON orders;

The following HELP STATISTICS request returns summary statistical information for orders that reports information for the geospatial column. This information includes the table cardinality known to the Optimizer indicated by the row with column value *.

Because the concept Unique Values is meaningless for Geospatial data types, a HELP STATISTICS request always returns the total number of base table rows in the position taken by a geospatial column, which in this case is o_spatial_location.

     HELP STATISTICS orders;
     *** Help information returned. 3 rows.
     *** Total elapsed time was 1 second.
Date      Time       Unique Values        Column Names
-------- -------- -------------------- ----------------------------
10/08/16 18:14:36               100        *
10/08/16 18:10:48               100        o_orderdatetime
10/08/16 18:05:44               100        o_orderkey
10/08/16 18:19:08               100        o_spatial_location