Advantages of Row Triggers - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
imq1591724555718.ditamap
dita:ditavalPath
imq1591724555718.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

The most common use of row triggers is with OLD and NEW correlation names that reference current row values as scalar quantities. The following bullets describe the advantages of row triggers:

  • The restriction that each row is processed only once guarantees that trigger executions are independent of one another.
  • It is not generally necessary to wait for completion of the triggered action for a given row to initiate action for the next row.
  • Because OLD and NEW correlation values can be accessed prior to dispatching the triggered action steps, most cases involve sending single AMP steps, so they do not require full table locks.

If the triggered action for a row changes data values in such a way that the WHEN condition search results for some rows might be affected, then the system must wait for completion of the triggered action before proceeding to the next row. A trigger with such characteristics cannot take full advantage of the Teradata parallel architecture.