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

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

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;