Teradata and Redshift are very similar in architecture and how data is distributed. For Teradata, it is the AMPs that hold part of the data in a table and for Redshift, it is the slices. There are major differences when it comes to how the data is stored on the file system. Teradata can also

Read More

Introduction Teradata has several methods available to perform a join. However, they all have one requirement in common: The rows of two tables that are joined must be located on the same AMP. The selected join method, together with the way in which rows to-be-joined are copied to a common AMP, is called a join

Read More

How does Teradata handle Skew in Joins? The skewed workload is one of the two most important problems we have to solve in Performance Tuning. This is especially important for join steps, as large amounts of data may be copied between the AMPs. The optimizer has techniques to execute joins separately for skewed primary index

Read More

The Art of Teradata Performance Tuning As a Teradata Performance Tuner, you not only need technical knowledge but also a lot of experience. Sometimes also a bit of luck. With this example, I’ll show you how incredible results can be achieved by rewriting a query. We assume the following scenario: One table has only a

Read More

Teradata can choose from various join methods. The most common ones are Merge Join, Hash Join, Product Join, or for PPI tables, the Merge Join variants Rowkey Based Merge Join, or Sliding Window Merge Join. Less often, however, we see the Teradata nested join, since specific prerequisites must be met before it can be used.

Read More

Skewed Teradata Joins – The Initial Situation Let’s take the following scenario as an example. One table contains currencies, the other table contains the accounts of our customers including the currency in which the account is managed.This means that the ISO code of the currency is the foreign key of the account table: CUSTOMER TABLE

Read More

What is Teradata Join Estimation? This article shows how Teradata Join Estimation works when no statistics have been collected. We show which heuristics are used to estimate the number of rows, and why it is important to always collect statistics on all join columns. Teradata Join Estimation Heuristics The worst case is the following: 2

Read More

What is Partial Group By? Joins are very expensive. Before there was PARTIAL GROUP BY, the join was first executed, then the result of the join was aggregated. The idea behind PARTIAL GROUP BY is simple: Aggregations that can be performed before the join (without changing the semantics of the query) reduce the amount of

Read More

Joining tables is one of the most expensive operations of an SQL statement. This is because each join requires the rows to be joined on a common AMP. If the two tables do not have the same primary index, it is necessary to copy one or both tables’ rows. This can cause a considerable number

Read More

1. Summary The purpose of this showcase is to demonstrate the way of optimization statement with multiple JOINs. The elegant way of tuning which leads Teradata Optimizer to the optimal JOIN strategy and using data redistribution instead of duplication where appropriate. Whenever you have complex logic with lots of joins inside try to decompose and

Read More