15.00 - 15.10 - Request Processing - Teradata Database

Teradata Database Introduction to Teradata

Product
Teradata Database
Release Number
15.00
15.10
Content Type
User Guide
Publication ID
B035-1091-151K
Language
English (United States)
Last Update
2018-09-25

SQL is the language that you use to make requests of Teradata Database, that is, you use SQL to query Teradata Database.

The SQL parser handles all incoming SQL requests in the following sequence:

The Parser looks in the Request cache to determine if the request is already there.
 

IF the request is…

THEN the Parser…

in the Request cache

reuses the plastic steps found in the cache and passes them to gncApply. Go to step 8 after checking privileges (step 4).

Plastic steps are directives to the database management system that do not contain data values.

not in the Request cache

begins processing the request with the Syntaxer.

The Syntaxer checks the syntax of an incoming request.
 

IF there are…

THEN the Syntaxer…

no errors

converts the request to a parse tree and passes it to the Resolver.

errors

passes an error message back to the requestor and stops.

The Resolver adds information from the Data Dictionary (or cached copy of the information) to convert database, table, view, stored procedure, and macro names to internal identifiers. The security module checks privileges in the Data Dictionary.
 

IF the privileges are…

THEN the Security module…

valid

passes the request to the Optimizer.

not valid

aborts the request and passes an error message and stops.

The Optimizer determines the most effective way to implement the SQL request. The Optimizer scans the request to determine where to place locks, then passes the optimized parse tree to the Generator. The Generator transforms the optimized parse tree into plastic steps, caches the steps if appropriate, and passes them to gncApply. gncApply takes the plastic steps produced by the Generator, binds in parameterized data if it exists, and transforms the plastic steps into concrete steps.

Concrete steps are directives to the AMPs that contain any needed user- or session-specific values and any needed data parcels.

gncApply passes the concrete steps to the Dispatcher.