17.00 - Utilize Use Lists with DML Groups - Parallel Transporter

Teradata® Parallel Transporter Application Programming Interface Programmer Guide

Parallel Transporter
June 2020
Programming Reference

When the SQL statement(s) in a DML group are executed during the application process, there are cases when not all columns of data are needed. In such cases, it is wasteful to use all columns.

In Teradata PT, use lists allow the user to define which columns will be needed by the SQL statements in a DML group. The DMLGroup object has an AddUseList method which takes two arguments: the number of columns in the column set and a list of column names followed by a NULL value.

dmlGr->AddUseList(3, "Associate_Id", "Associate_Name", "Salary", NULL);

A DMLGroup object has a maximum of one use list. Columns can be added to this use list in one call or through a series of multiple calls to the AddUseList function. For example, three columns can be added to a use list in separate calls to the AddUseList function:

dmlGr->AddUseList(1, “Associate_Id”, NULL);
dmlGr->AddUseList(2, “Associate_Name”, “Salary”, NULL);

Or three columns can be added in the same call:

dmlGr->AddUseList(3, “Associate_Id”, “Associate_Name”, “Salary”, NULL);