17.10 - Improving XML Query Performance - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - XML Data Type

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

XML type columns cannot be part of an index. However, if the XML type is a non-LOB type, it can be part of a join index although it cannot be part of the primary index of the join index.

In addition, you can use the XMLEXTRACT method to extract paths or values of interest in the XML document structure to shred portions of the document into columns of other SQL data types that can be indexed. You can design your tables and queries to leverage this capability to restrict XML queries to rows of interest, thereby improving performance. You can also use the AS_SHRED_BATCH stored procedure to shred XML documents.