15.10 - Example: Short Requests Based on I/O Counts - Teradata Database

Teradata Database SQL Data Definition Language Syntax and Examples

Product
Teradata Database
Release Number
15.10
Published
December 2015
Language
English (United States)
Last Update
2018-06-05
dita:mapPath
SQL_DDL_15_10.ditamap
dita:ditavalPath
ft:empty

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;