17.00 - Example: Short Requests Based on I/O Counts - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
Release Date
September 2020
Content Type
Programming Reference
Publication ID
B035-1144-170K
Language
English (United States)

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;