TDWMGetDelayedUtilities Function | Application Programming Reference | Vantage - 17.10 - TDWMGetDelayedUtilities - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Application Programming Reference

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1090-171K
Language
English (United States)

Returns the utility delay queue.

Syntax

REPLACE FUNCTION TDWM.TDWMGetDelayedUtilities (
) RETURNS TABLE (
    Username       VARCHAR(128)CHARACTER SET UNICODE,
    HostId         SMALLINT,
    SessionNo      INTEGER,
    TotalTimeHeld  INTEGER,
    OverRidable    CHAR CHARACTER SET LATIN,
    PEId           INTEGER,
    RequestNum     INTEGER,
    WDDelayed      INTEGER,
    ObjDelayed     INTEGER,
    UtilDelayed    INTEGER,
    RuleType       INTEGER
    RuleName       VARCHAR(128) CHARACTER SET UNICODE
  )
  ...
;

Syntax Elements

Username
User name of the session.
HostId
Host ID of the session number for the delayed utility.
SessionNo
Session number for the held utility.
TotalTimeHeld
Total number of wall clock seconds that this request has been held.
OverRidable
Request or session allowed to be aborted or released by the administrator. A session cannot be released if it exceeds the internal AMP worker task limit. A delayed session can always be aborted.
If the value is Y, this request or session is overridable.
If the value is N, this request or session is not overridable.
The queue table requests are controlled internally by the database and cannot be altered by the administrator.
If Request Flag is 6, this field indicates if the delayed session can be released. A session cannot be released if it exceeds the internal AMP worker task limit or an internal utility limit.
A delayed session can always be aborted.
RuleId
ID of the rule that caused this query to be delayed.
RequestNum
Request number for the held utility.
WDDelayed
Indicator that the request is delayed for a workload rule.
A value of zero indicates the request is not delayed because of a workload throttle.
ObjDelayed
Indicator that the request is delayed for a system query or system session throttle rule.
A value of zero indicates the request is not delayed because of a system throttle.
UtilDelayed
Indicator that the request is delayed for a Utility rule.
A value of zero indicates the request is not delayed because of a utility throttle.
RuleType
Rule type for the request:
  • 0 = Workload
  • 1 = System
  • 2 = Utility
  • 3 = Workload group
  • 4 = Virtual Partition
RuleName
Rule name identified in the Rule ID field.

Example: Using TDWMGetDelayedUtilities

SELECT * FROM TABLE (TDWM.TDWMGetDelayedUtilities()) AS t1;
 *** Query completed. 4 rows found. 6 columns returned.
 *** Total elapsed time was 1 second.
Username HostId SessionNo  Total TimeHeld  OverRidable  RuleId
-------- ------ ---------  --------------  -----------  ------
USER1         1      2709              16            0       1
USER1         1      2710              12            0       2
USER1         1      2711               9            0       3
DBC           1      2712               5            0       4