17.10 - Nontemporal Delete - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Temporal Table Support

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1182-171K
Language
English (United States)
Rows that are closed in transaction time provide a history of all modifications and deletions on tables that have a transaction-time column. The automatic history that tables with transaction time provide can be used for regulatory compliance auditing, so these rows are generally inaccessible to DML modifications. Because NONTEMPORAL DML statements can modify closed rows, the special NONTEMPORAL privilege is required. For more information on the NONTEMPORAL privilege, see Usage Notes.

A nontemporal delete, also referred to as vacuuming the table, physically deletes the qualifying rows from the table.

The best practice is to back up the data before performing a nontemporal delete. Tracking of any deleted rows will be lost.

All rows, both open and closed, are considered for qualification conditions specified in the DELETE statement. If multiple transaction-time tables are referenced, they are joined using nonsequenced select semantics.

If the table being deleted has valid time, both valid and rows that are no longer valid are considered for qualification conditions specified in the query.

The only difference between a nonsequenced delete and a nontemporal delete on a table with transaction time is that a nonsequenced delete performs a logical delete of rows whereas a nontemporal delete performs a physical delete of rows.