Improving SQL Performance with Simple Query Rewrites: Dealing with Duplicates and Business Calendars

sql2

The Teradata flavor of SQL is still, in principle, a declarative language. Hence, there can be multiple ways to describe an SQL query and achieve the same result. While the answer is the same, Teradata may use a completely different execution plan based on how the query is expressed. One approach is investing in heavy …

Read more

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

Negative Impact of Applying Functions to Join Columns in Teradata Joins: Performance Implications and Solutions

tune1

Functions on Join Columns and Their Impact on Teradata Performance In many Teradata systems, developers apply functions directly in join conditions to work around data-model inconsistencies.While this approach might seem harmless, it can dramatically affect optimizer decisions and query performance — and often reveals deeper data-model issues. Example of a Problematic Join Applying functions to …

Read more

Understanding Teradata Statistics Histograms: How the Optimizer Estimates Cardinality for WHERE Conditions

tune3

Teradata Statistics Histograms – A Short Introduction Many are familiar with Optimizer’s statistical confidence levels. I was recently surprised to discover that a “high confidence” rating does not guarantee a fully accurate estimation (provided the statistics collected are not stale). While I remain hopeful that my observations may be attributed to a bug, I wanted to …

Read more

Mastering Teradata Performance Tuning

tune3

The Art of Teradata Performance Tuning As a Teradata Performance Tuner, technical expertise and experience are essential, occasionally accompanied by fortuitous circumstances. I’ll demonstrate the remarkable outcomes that can be attained by rephrasing a query using this example. Assuming this scenario: One table has a minimal number of rows, while the other is partitioned and …

Read more

SQL Tuning Goals: Improving Performance and Reducing Resource Usage

tune4

Learn about the goals of SQL tuning and how to optimize database performance by reducing resource usage. Skew, IOs, and CPU seconds are key metrics. Discover how to ensure completeness and correctness of Teradata statistics, detect missing and stale statistics, and improve query plans.

Optimize Query Runtimes and Save Costs with Cloud Data Warehousing Platforms: Snowflake, BigQuery, and Redshift

sql1

Add Snowflake, BigQuery, and Redshift to your Knowledge As a passionate Teradata expert, I have fine-tuned thousands of SQL queries throughout my professional journey. It was an enjoyable and fulfilling experience to witness how, with expertise, query runtimes could be optimized from hours to mere minutes or seconds. While end-users were pleased with the results, …

Read more

Optimizing Teradata Performance through Statistics and Primary Index Selection

sql2

1. Statistics In Teradata, comprehending and overseeing statistics is essential for optimizing database performance. Statistics provide the optimizer with precise data about stored information, allowing for well-informed decisions when handling queries. This article will explore the significance of statistics in Teradata, their effect on query performance, and recommended methods for upkeep. The Role of Statistics …

Read more

Optimizing Performance with Teradata ORDER BY: How Sorting is Done in Parallel Without Bottlenecks

arch3

Teradata ORDER BY and Performance To employ a basic sorting algorithm, all rows must be present in one location for sorting. However, this is not feasible in Teradata, where numerous AMPs retain a segment of each table. Transporting all the rows to one AMP for sorting purposes would result in a non-scalable and bottlenecked process. …

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 & Miami, 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.