Improving Stored Procedure Performance with Teradata MAPS Architecture

arch3

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 cursor was designed to process only a limited number of rows. Despite this, the stored procedure took up to …

Read more

Date ranges and business calendars beyond recursion and Teradata SYS_CALENDAR

sql1

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 approach to build both a wide date range as well as a narrow one. We …

Read more

The Teradata Recursive Query for Performance Tuning

sql1

Problem-solving without a Teradata Recursive Query To depict a corporate hierarchy in our instance, we can employ a non-recursive approach, illustrated by the query presented below: The above query has several harmful properties: Problem-solving with a Teradata Recursive Query The above recursive query has several benefits: The only modification required to enlarge the Company_Hierarchy column …

Read more

An Introduction to Teradata Recursions: Generating Date Ranges Without a Physical Table

sql2

 Introduction to Teradata Recursions To link records from a primary table with a specific date range from a secondary table, a common requirement is to create a simulated history table with snapshot dates using a change history table with defined timelines. Consider the following illustration: The proposed solution would resemble this: You must create your …

Read more

DWHPro

Expert network for enterprise data platforms. Senior consultants, project teams built for your challenge — across Teradata, Snowflake, Databricks, and more.

📍Vienna, Austria & Jacksonville, Florida

Quick Links
Services Team Teradata Book Blog Contact Us
Connect
LinkedIn → [email protected]
Newsletter

Join 4,000+ data professionals.
Weekly insights on Teradata, Snowflake & data architecture.