What Is A Cursor In A Teradata SQL Stored Procedure? When we are talking about Cursors in Teradata SQL stored procedures, we refer to a pointer to a data record in the result set of an SQL query: SELECT * FROM table_name; Cursors are used to iterate over a result set from one row to

Read More

This article shows you a possible solution to handle rounding issues in Teradata. Let’s assume we have the following table definition: CREATE VOLATILE TABLE ROUNDING_PROBLEM (             AMOUNT DECIMAl(18,2),             MONTHS INTEGER ) NO PRIMARY INDEX ON COMMIT PRESERVE ROWS; INSERT INTO ROUNDING_PROBLEM VALUES (10.25,3); Let’s further assume that our task is to divide each

Read More

It is assumed that you are familiar with the basic concepts of historization to get the most out of this article. Temporal data management is a crucial task in data warehousing. A few years ago, we had to write our temporal data management functionality to historize our data and keep different historical timelines. Starting with

Read More

Introduction Even though solid-state disks (SSDs) are increasingly replacing hard disks, access to mass storage will always be the slowest process in a database system. Therefore, all database providers search for methods to reduce the number of I/Os. As of Release 14.10, Teradata provides functions for reducing I/Os, such as column storage, block-level compression, or

Read More

What is Block Level Compression (BLC), and how does it work? Block Level Compression (BLC) is a feature introduced with Teradata 13.10 and allows for compression of entire data blocks, contrary to other compression methods applied on column level (MVC, ALC). Only the data blocks containing rows are compressed. No compression is done on the

Read More

Teradata 14.00 comes with three improvements, allowing you to tailor the collection of statistics more specifically to your needs: COLLECT STATISTICS USING SAMPLE n PERCENT COLUMN(column_name) ON table_name; COLLECT STATISTICS USING MAXINTERBALS n COLUMN(column_name) ON table_name; COLLECT STATISTICS USING MAXVALUELENGTH n COLUMN(column_name) ON table_name; The USING SAMPLE option Although SAMPLE statistics have been available for

Read More

Starting with Release 14.00 there are several improvements for Teradata statistics which are worth being described in detail. First of all, you should get comfortable with the new syntax, which you should use from now on. This article will cover the new syntax and discuss its advantages which are available starting with Teradata 14.00 COLLECT STATISTICS

Read More