PrioritizePreparedCollect Stored Procedure | Teradata Vantage - PrioritizePreparedCollect - 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ā„¢

Changes the submission order of an individual collection within a prepared commands list.

Syntax

REPLACE PROCEDURE TDSTATS.PrioritizePreparedCollect (
  IN RequestID    BIGINT,
  IN Priority     INTEGER
  OUT NumUpdated  INTEGER
)
  ...
;

Syntax Elements

RequestID
TDSTATS database unique ID for an individual prepared collection.
This input parameter cannot be NULL.
Priority
Changed priority of the specified collection expressed as a relative rank among other collections in the commands list containing RequestID.
This input parameter cannot be NULL.
NumUpdated
Possible values:
  • 1 means the operation was successful.
  • 0 means the operation failed.

Usage Notes

You can call the SelectPreparedCollects external stored procedure to determine the priority of other collections in the same commands list.

The modified priority is only relevant to the commands list containing the specified collection as identified by RequestID. Future invocations of PrepCollect will not incorporate the modified priority.

If two or more collections have the same priority within a commands list, the submission order among them is undefined.

Example: Using PrioritizePreparedCollect

The following example shows how to change the priority of pending collection number from 12 to 1 (that is, one being the highest priority).

CALL TDSTATS.PrioritizePreparedCollect(12, 1, NumUpdated);

Result:

*** Procedure has been executed.
*** Total elapsed time was 1 second.
 NumUpdated
-----------
          1

Related Information

For more information on ... See ...
the priority of other collections in the commands list SelectPreparedCollects.
preparing a prioritize list of COLLECT STATISTICS statements PrepCollect.