SelectStmt - Parallel Transporter

Teradata® Parallel Transporter Reference

Product
Parallel Transporter
Release Number
17.10
Published
February 2022
Language
English (United States)
Last Update
2023-11-29
dita:mapPath
abr1608578396711.ditamap
dita:ditavalPath
obe1474387269547.ditaval
dita:id
ogv1478610452101
Product Category
Teradata Tools and Utilities

SelectStmt (SELECT statement) is the required attribute that the Export operator uses to perform data selection from the database tables. Multiple parallel instances of the Export operator and multiple sessions within each instance can improve the performance of an export.

A Select request within an Export script can have multiple SELECT statements. A SELECT statement can be optionally preceded by a LOCKING modifier.

However, Export SELECT requests cannot:
  • Specify a USING modifier.
  • Access non-data tables, such as SELECT DATE or SELECT USER.
  • Be satisfied by one or two AMPs, such as SELECT statement which accesses rows based on the primary index or unique secondary index of a table.
  • Contain character large object (CLOB) or binary large object (BLOB) data types.
  • Contain JSON (JavaScript Object Notation) data type.
  • Contain XML data type.

The following table describes types of SELECT requests.

Type of SELECT Request Result
Contains multiple SELECT statements The database might execute the requests in parallel, but responses are still returned in the order of the requests, for the first statement first, then for the second, and so on.

If the structure of response rows differs, an error results and the job terminates.

Uses a LOCKING modifier The specified lock remains in effect during the execution of all statements within the request that contains the modifier. The database does the following:
  • Implements all resource locks for the entire request before executing any of the statements in the request.
  • Maintains the locks until all of the response data for the request is moved to spool tables.

Following is a valid SELECT request using the LOCKING modifier:

LOCKING TABLE MYTABLE FOR ACCESS SELECT COL1, COL2 FROM MYTABLE;

Note that the LOCKING modifier can precede the SELECT statement.

Uses an ORDER BY clause You can specify one or multiple Export instances.

If you specify multiple instances, only instance 1 will connect sessions to preserve the exported rows in order. The other instances will not connect any sessions and will not export any data.

Following is a valid ORDER BY clause:

SELECT COL1, COL2 FROM MYTABLE ORDER BY COL1;