Performance Considerations - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

Performance Considerations

For best performance, use the TOP N option instead of the QUALIFY clause with RANK or ROW_NUMBER.

  • In best cases, the TOP N option provides better performance.
  • In worse cases, the TOP N option provides equivalent performance.
  • See “SELECT” on page 8.

    If a SELECT statement using the TOP N option does not also specify an ORDER BY clause, the performance of the SELECT statement is better with BTEQ than with FastExport.

    A recursive query is a way to query hierarchies of data, such as an organizational structure, bill-of-materials, and document hierarchy.

    Recursion is typically characterized by three steps:

  • Initialization
  • Recursion, or repeated iteration of the logic through the hierarchy
  • Termination
  • Similarly, a recursive query has three execution phases:

  • Initial result set
  • Iteration based on the existing result set
  • Final query to return the final result set