Monday, 10 September 2018

Hash Functions to identify skewed data

On day to day activity we often get situation when the database has a lot of space left but query fails with “2644: No more room in database“. If any table has severe skewing it can cause the database to run out of space.
Here we will learn how to identify data causing skewness using hash functions.
Following query identifies the database space:

Wednesday, 5 September 2018

Easy way to get Syntax for a command in Teradata


A MACRO can help you getting the Syntax help if you are new to Teradata or new to any syntax.
MACRO is a Teradata extension to ANSI SQL that contains prewritten SQL statements.
The actual text of the macro is stored in a global repository called the Data Dictionary (DD).
A macro allows us to name a set of one or more statements. When we need to execute those statements, simply execute the named macro. Macros provide a convenient shortcut for executing groups of frequently-run SQL statements.

Below is complete list of commands to manipulate macros.