16.20 - Performance Measurement - Teradata Tools and Utilities

Teradata® Call-Level Interface Version 2 Reference for Mainframe-Attached Systems

Teradata Tools and Utilities
September 2019
Programming Reference

The Return-time and Timing-precision options can be used to determine the amount of time needed to process a request and its response from the perspective of the client. If Return-time requests such timing, up to five timestamps are returned in Time1 through Time5. The determination of which timestamps are returned and to which points in the processing they apply are platform-dependent. The returned Time1-status through Time5-status values indicate which Time values are valid. Each Time is four bytes long and contains an unsigned binary timestamp.

On mainframe-connected systems:

  • Time1 is set when TDP accepts a request from CLIv2
  • Time2 is set when a request is passed to the Teradata Database
  • Time3 is set when the response is received from the Database
  • Time4 is set when the response leaves TDP
  • Time5 is set when the response is placed into the CLIv2 response buffer.

The difference between two timestamps represents the elapsed time between the two points in processing. The precision for the timestamps is indicated by Timing-precision. On mainframe-connected systems, timestamps are formed by manipulating the IBM standard Time-of-Day (TOD) clock as indicated by the following Assembler code:

STCK area
LM R0,R1,area
SR R15,R15
SRDL R0,12(R15)

Time1-status through Time5-status each contain a single EBCDIC character that indicates of the status of the corresponding Time. The status values are:

  • 'V' if the timestamp is valid
  • 'O' if the timestamp overflowed four-bytes
  • A ‘space’ or ‘binary zero’ if the timestamp is not valid