17.10 - Example: Creating a Join Index for a Table with JSON Columns - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

The table definition for this example includes two JSON columns, jsn1 and jsn2. The jsn1 column is non-LOB and jsn2 in an LOB column.

CREATE TABLE jsonTable (id INTEGER,
                jsn1 JSON(1000) CHARACTER SET LATIN,
                jsn2 JSON(1M) INLINE LENGTH 30000 CHARACTER SET LATIN);

The join index includes the id column and the jsn1 column.

CREATE JOIN INDEX jsonJI AS SELECT id, jsn1 FROM jsonTable;