SYSPROCPLAN
Column | Type | Explanation |
---|---|---|
procid | INTEGER | Identifying code for the routine |
planid | INTEGER | Identifying code for the plan |
datakey | CHAR(1) | Type of information stored in data column:
|
seqno | INTEGER | Line number within the plan |
created | DATE | Date when plan was created |
datasize | INTEGER | Size (in bytes) of the list or plan |
data | CHAR(256) | Encoded (compiled) list or plan |
Before a routine is run, its dependency list in the data column is examined. If the major version number of a table accessed by the plan has changed, or if any object that the routine uses has been modified since the plan was optimized (for example, if an index has been dropped), then the plan is optimized again. When datakey is I, the data column stores information about UPDATE STATISTICS and PDQPRIORITY.
It is possible to delete all the plans for a given routine by using the DELETE statement on sysprocplan. When the routine is subsequently executed, new plans are automatically generated and recorded in sysprocplan. The UPDATE STATISTICS FOR PROCEDURE statement also updates this table.
A composite index on the procid, planid, datakey, and seqno columns allows only unique values.