Total Pageviews

FLOW OF SQL STATEMENT

FLOW OF SQL STATEMENT
  1. A user generates an SQL query on the channel attached client.  The query can either be from a BTEQ session at an interactive terminal, from a compatible fourth generation language, or can originate from within an application program coded in a host language.
  2. The CLI request handler packages the request and sends it to the Teradata Director Program (TDP) for routing to the server.
  3. The TDP establishes a session, then routes the request across the communications channel to the parsing engine (PE).
  4. The parser component of the PE opens the request package and parses the SPL code for processing, interprets it, checks its syntax, and optimizes the access plan.
    1. Without errors - The parser decodes the request into a series of work steps and passes them to the dispatcher.
    2. With errors - The dispatcher receives the appropriate error message and returns it to the requester.  Processing terminates.
The dispatcher sequences the steps and passes them on to the BYNET with instructions about whether the steps are for one Access Module Process (AMP), an AMP group, or for all AMPs.
  1. The BYNET (or virtual BYNET on a single node system) distruibutes the execution steps to the appropriate AMP for processing.
  2. The AMPs process the execution steps by performing operations on the database.  The AMPs make these operations by making calls to the file system.
  3. The file system performs primitive physical data block operations by locating the data blocks to be manipulated and then passing contol to the disk subsystem.
  4. The disk subsystem retrieves the requested blocks for the file system.
  5. The disk manager returns the requested blocks to the file system.
  6. The file system returns the requested data to the database manager.
  7. The database manager sends a message back to the dispatcher stating that the data is ready to be returned to the requesting user, then sorts and transmits the data to the interface engine over the BYNET.
  8. The BYNET merges the sorted response and returns it to the requestion interface engine for packaging.
  9. The dispatcher builds the response message and routes it to the requesting client system.
  10. The TDP receives and unpacks the response messages and makes them available to the CLI.
  11. CLI passes the received data back to the requesting application in blocks.
  12. The requesting application receives the response data in the form of a relational table.

No comments:

Post a Comment