SetResourceRate Function | Application Programming Reference | Teradata Vantage - SetResourceRate - Teradata Vantage - Analytics Database

Application Programming Reference

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
qld1628112131956.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
ajo1472244909562
lifecycle
latest
Product Category
Teradata Vantageā„¢

Sets either the ResMonitor or ResLogging rate.

This function returns the previous collection rate value in seconds.

Syntax

REPLACE FUNCTION SYSLIB.SetResourceRate (
  SampleRate INTEGER,
  LogChange VARCHAR(1),
  VprocChange VARCHAR(1)
) RETURNS INTEGER
  ...
;

Syntax Elements

SampleRate
Value of the collection rate. This field is used either to collect resource data or to log resource data to the resource usage tables.
You can specify one of the following:
  • The ResMonitor rate value if you want to change the resource monitoring rate.
  • The ResLogging rate value if you want to change the resource logging rate.

    The value should be an integral divisor of 3600.

  • Zero to turn off the resource collection or logging.
LogChange
Indicator of whether this rate applies to the ResLogging or ResMonitor rate:
  • Y or y = ResLogging rate
  • N, n, NULL, or blank = ResMonitor rate
VprocChange
This field is deprecated.

Usage Notes

The SetResourceRate function provides similar functionality to the PMPC SET RESOURCE RATE request. For information about this interface and the ResMonitor and ResLogging rates, see SET RESOURCE RATE.

Example: Using SetResourceRate

This example uses SetResourceRate to set the ResMonitor rate.

SELECT SetResourceRate(60, 'N', 'N');

Result:

 *** Query completed. One row found. One column returned.
 *** Total elapsed time was 5 seconds.
SetResourceRate(60,'N','N')
---------------------------
                        600