16.20 - Example: Short Requests Based on I/O Counts - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-24
dita:mapPath
wkf1512081455740.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

An alternative to specifying only SUMMARY or THRESHOLD options for short duration requests, specify the IOCOUNT option modifier. Specify a count only or fully log request information based on the number of disk I/O operations required to complete a request.

This request counts the number of requests during a session in each of the I/O intervals specified for user_1:

     BEGIN QUERY LOGGING LIMIT SUMMARY=10, 15, 20 IOCOUNT ON user_1;

I/O count intervals are created for the number of I/O operations required to complete the request, so this request specifies the following intervals:

  • 0 - 10 I/Os
  • 10 - 15 I/Os
  • 15 - 20 I/Os
  • > 20 I/Os

For user_1, this request increments the request counter for requests in a session with fewer than 10 I/O operations and logs a complete DBQL entry in DBQLogTbl for requests with more than 10 I/O operations:

     BEGIN QUERY LOGGING LIMIT THRESHOLD=10 IOCOUNT ON user_1;