View Materialization and Other Database Object Substitutions - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
Language
English (United States)
Last Update
2024-04-03
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

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

For example, 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 join or secondary indexes whenever the substitution improves query performance. 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 describes database objects like snapshot summary tables and 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.

These query rewrites are performed by the Optimizer subsystem after the Query Rewrite subsystem has completed its rewrite tasks.