Occasionally, it is necessary to utilize a cursor within a stored procedure to execute specific functionality. I recently encountered a stored procedure that contained a loop with multiple INSERT statements executed through a cursor. This particular...
Discover how Teradata summary statistics provide valuable information about the number of rows in a table, helping to optimize performance tuning.
Teradata ORDER BY and Performance If we chose a simple sort method, all rows would have to be available in one place to be sorted. This is, of course, not possible in Teradata, as hundreds of AMPs hold a portion of each table. Copying all rows to one...
In a previous article, Roland explained how to use recursion to build a data range without touching a physical table. This time, we explore an alternative approach that avoids recursion at the expense of single-AMP, single-row access. We can use this...
Learn about the differences between GROUP BY and DISTINCT for aggregations in Teradata. The optimizer now selects the appropriate algorithm depending on data demographics. Understand when to use each method to optimize query performance.
A Teradata Transient Journal is a dictionary table maintained across the whole system to protect transactions against system failures and deadlocks. Each AMP manages its local Transient Journal, where the table rows are copied before being changed by...
Teradata uses different join methods and has different ways to bring the rows of the two tables to a common AMP, which is a prerequisite for joining. Join geography and join method are called join strategy; for both, the goal is to minimize the resou...
What influences the Teradata Load Performance? Teradata allows only a limited number of bulk loads to be executed together as they consume many resources. The precise limit depends on your Teradata system. It will be somewhere in the lower 2-digit ar...
The Teradata Primary Index and Hash Collisions Typically it makes no difference whether we use INTEGER data types or CHARACTER data types in the Teradata Primary Index. The Teradata hashing algorithm is highly efficient, and at most, when joining two...
Teradata MERGE INTO vs. UPDATE In this article, we compare the UPDATE statement with the MERGE INTO statement and work out the differences in performance. We also show a MERGE INTO statement’s limitations compared to an UPDATE statement. Considering...