DWHPro Insights

Insights

327 technical articles on Teradata, Snowflake, Databricks, SQL tuning and data warehouse architecture — written from production experience, not vendor decks.

Understanding Teradata’s SAMPLE Function: Randomly Select Rows and More Widely read

Illustration of a glossy orange database cylinder with data fragments across its surface

What is the Teradata Sample Function? The SAMPLE function returns a set of randomly selected rows. Here are the characteristics: The Syntax of the Sample Function SAMPLE [WITH REPLACEMENT] [RANDOMIZED ALLOCATION][WHEN <condition> THEN] {<number of row> | <percentage>} […,<number-of-rows> | <percentage>][ELSE {<number of rows> | <percentage } END] Here are some examples of how to …

Read more

Efficiently Load Tables with Teradata Fast Path INSERT/SELECT: Requirements and Advantages

Illustration of a stopwatch dial on an orange paint-splash background

Fast Path INSERT/SELECT efficiently loads a single table. Requirements for Teradata Fast Path INSERT /SELECT How does the Fast Path INSERT/SELECT work? This reduces access to mass storage (such as hard disk or solid-state disk). The process involves generating complete data blocks on every AMP and subsequently transferring them to mass storage using a single …

Read more

Hot Standby Nodes: The Secret to Seamless Performance and Recovery

Illustration of a person in a suit standing beside a database cylinder

A hot standby node belongs to a clique of nodes and does not host virtual processes such as AMPs or Parsing Engines. The standby node remains idle until a member of its clique crashes or fails. At this point, the standby node is activated to take over the failed node’s responsibilities. Failover may move AMPs …

Read more

Optimizing Teradata Joins with Skewed Data: Strategies and Solutions

Illustration of a stopwatch dial on an orange paint-splash background

Skewed Teradata Joins – The Initial Situation Consider the scenario where one table includes various currencies while the other comprises customers’ accounts with their corresponding currency. Essentially, the ISO code of the currency serves as a foreign key in the account table. CUSTOMER TABLE CUSTOMER_ID CUSTOMER_NAME CURRENCY_CD 1 Nina Lowery EUR 2 Alexia Neal USD …

Read more

Teradata Data Access: Single-AMP vs. All-AMP Binary Search and Sequential Search Popular

Illustration of three stacked database units of differing heights inside a circle

Teradata data access is categorized based on the number of AMPs involved and the technique employed to search rows within a data block. In our article about SQL Tuning, we mentioned that one of the main goals in performance optimization is to distribute the workload evenly across all AMPs. Using a single AMP is best …

Read more

Optimizing Join and Aggregation with Teradata UNION ALL Views Widely read

Illustration of a glossy orange database cylinder with data fragments across its surface

Teradata 16 introduces a new option for handling sets of rows combined with “UNION ALL” in views and derived tables, reducing resource usage. The optimizer can apply aggregation steps and join operations to each branch of the “UNION ALL” separately, resulting in smaller spool sizes and improved performance.

Protected by Security by CleanTalk