Teradata 16 introduces a new option for handling sets of rows combined with “UNION ALL” in views and derived tables, reducing resource usage. The optimizer can apply aggregation steps and join operations to each branch of the “UNION ALL” separately, resulting in smaller spool sizes and improved performance.
To optimize Teradata SQL performance, it is crucial to identify the root cause of any issues. The SQL statement itself is typically not the culprit but rather one or more stages of the execution plan. This article does not cover genuine optimization techniques. Instead, it presents a pragmatic method for query optimization. I have noticed …
Learn how the CHAR2HEXINT function helped solve a real-world problem of extracting number parts from a string in Teradata SQL. Read on for the solution.
Learn how variable declarations work in a Teradata Stored Procedure. Declarations are always local to the surrounding compound statement. See examples.
Learn how to improve the performance of SQL statements by rewriting them through this article on Teradata tuning. Follow along as we analyze a high-runtime SQL statement and optimize it to significantly reduce disk I/O and spool space usage.
Learn how Teradata applies two effective join optimization methods, Early and Partial GROUP BY, for decision support workloads with lots of aggregations. These transformations reduce resource usage and are widely used in modern databases. Discover how to improve the optimizer’s chance to apply these techniques by collecting statistics on all join and aggregation columns.
Learn about the characteristics of static and dynamic SQL in Teradata stored procedures. Discover how to use variables and parameters in SQL statements.
Teradata SQL Stored Procedures enhance traditional SQL with procedural language features like iterations, condition and error handling, and variables. Learn more here.
DWHPro
Expert network for enterprise data platforms. Senior consultants, project teams built for your challenge — across Teradata, Snowflake, Databricks, and more.