The Idea Behind This Trick for UNION ALL What if you want to perform a UNION ALL on two different columns of the same table? Normally you would do this: SELECT CloseDate FROM Customer UNION ALL SELECT OpenDate FROM Customer ; However, this method has a disadvantage: The table Customer must be queried with two

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

How Do I Select The Appropriate Data Type In Teradata? Datatype conversions are very costly and can require a lot of CPU on large tables. The wrong selection of datatypes has a negative effect on the execution plan. In this article, I will explain the details and how to get optimal performance from your queries

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

What is the Waterfall Model? In the waterfall model, the data warehouse project is proceeding one phase after the other. Only when one phase is completed is the next phase started. The following phases will be passed through: Requirements Gathering (more about why I don’t like this term later) Design Implementation Verification (Testing, User Acceptance

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

Teradata BTEQ is the first tool from Teradata for executing SQL queries. You can execute queries, export data, and import data. Teradata BTEQ also offers more possibilities than Teradata SQL Assistant and should be one of your basic tools as a Teradata developer. BTEQ can be used interactively or to execute batch scripts. ETL-Tools versus

Read More

Teradata Partitioning and Performance Depending on the application, a different Teradata Partitioning strategy may be used. Teradata Partitioning has one goal – to optimize the performance of your queries. Therefore you should ask yourself the following questions before creating a PPI table: Considerations to be made before Partitioning a Table Teradata Partitioning Strategies Each partition

Read More

Teradata Spool Space Introduction 4 Types of Teradata Spool Space IntermediateWill be released as soon as it is no longer needed. Intermediate Spool Space is required by derived subqueries, for example. The execution plan provides information about when spool space is released. OutputThe Output Spool Space holds the result of an SQL request. VolatileThey are

Read More

Introduction to Teradata Sample Statistics In this article, I will show you when, how, and why you can/should use Teradata Sample Statistics. When using sample statistics, the columns must have as many different values as possible. For example, a UPI fulfills this requirement, but the NUPI can also be used if it has as many

Read More