View Materialization and Other Database Object Substitutions - Analytics Database - Teradata Vantage

SQL Request and Transaction Processing

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
zfm1628111633230.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
evd1472255317510
lifecycle
latest
Product Category
Teradata Vantageā„¢

Perhaps the most obvious query rewrite concern is instantiating virtual database objects and replacing specified query structures with more high-performing substitutes when possible.

For example, all views referenced by a query must be resolved into their underlying base tables or covering indexes before the query can be performed. These rewrite methods also replace base tables and table joins with hash, join, or even secondary indexes whenever the substitution makes the query perform more optimally. These substitutions also apply to view materialization if base tables referenced by the view can be replaced profitably, Partial GROUP BY rewrites, and Common Spool Usage rewrites. The term materialized view is sometimes used to describe database objects like snapshot summary tables, and hash or join indexes. For purposes of the current discussion, the term refers to materializing the base table components of a view definition in a spool relation.

For various reasons, these query rewrites are performed by the Optimizer subsystem after the Query Rewrite subsystem has completed its various rewrite tasks.