Start of change

SYSPACKAGESTMTSTAT

The SYSPACKAGESTMTSTAT view contains one row for each SQL statement in every SQL package.

The following table describes the columns in the SYSPACKAGESTMTSTAT view:

Table 1. SYSPACKAGESTMTSTAT view
Column Name System Column Name Data Type Description
PACKAGE_SCHEMA COLLID VARCHAR(128) Name of the schema.
PACKAGE_NAME NAME VARCHAR(128) Name of the SQL package.
SPACE_NAME SPCNAME VARCHAR(10)

Nullable

Generated space name within the package for extended dynamic packages. Contains the null value for DRDA packages which have only 1 internal space.
STATEMENT_NUMBER STMTNBR INTEGER Number of this statement in the space.
STATEMENT_NAME STMTNAME VARCHAR(128)

Nullable

Name of the statement.

Contains the null value for DRDA packages.

NUMBER_TIMES_PREPARED NBRPREP INTEGER Number of times this statement has been prepared.
NUMBER_TIMES_EXECUTED NBREXEC INTEGER Number of times this statement has been executed.
ROWS_AFFECTED ROWCNT INTEGER Total rows fetched, updated, inserted, or deleted for all executions of the statement. Contains 0 if the statement is not a FETCH, SET, VALUES INTO, UPDATE, INSERT, DELETE, or MERGE. Will contain 0 for a SET or VALUES INTO statement that is not implemented using a cursor.
COMPRESSES_SINCE_LAST_USED CMPLU INTEGER Number of times the package has had storage compressed since this statement was last run. This value is used when processing the SQL_STMT_COMPRESS_MAX QAQQINI option to determine when to remove the space used for the QDT for a statement.

Will always be 0 for DRDA packages.

PARAMETER_MARKER_CONVERTED PMCNVT CHAR(3) For a dynamic statement, indicates whether literals were converted to parameter markers for statement reuse.
YES
Literals were converted to parameter markers.
NO
No conversion done or statement is not dynamic.
WITH_HOLD WITHHOLD CHAR(3)

Nullable

Specifies the WITH HOLD option for statement:
YES
WITH HOLD clause specified.

Contains the null value if the clause was not specified.

FETCH_ONLY FETCHONLY CHAR(3)

Nullable

Specifies the FOR READ ONLY option for statement:
YES
FOR READ ONLY clause specified.

Contains the null value if the clause was not specified.

CONCURRENTACCESSRESOLUTION CONCURRENT CHAR(1)

Nullable

Specifies the concurrent access resolution for the statement:
W
Wait for outcome
U
Use currently committed
S
Skip locked data

Contains the null value if concurrent access was not specified at the statement level.

NUMBER_REBUILDS NBRREBLD INTEGER Number of times QDT or access plan has been rebuilt.
ISOLATION ISOLATION CHAR(2)

Nullable

Isolation option specification:
RR
Repeatable Read (*RR)
RS
Read Stability (*ALL)
CS
Cursor Stability (*CS)
UR
Uncommitted Read (*CHG)
NC
No Commit (*NONE)

Contains the null value if isolation level was not specified at the statement level.

NUMBER_ROWS_TO_OPTIMIZE OPTROWS INTEGER

Nullable

Number of rows specified on the OPTIMIZE FOR n ROWS clause. -1 means that the value *ALL was specified.

Contains the null value if the clause was not specified.

NUMBER_ROWS_TO_FETCH FETCHROWS INTEGER

Nullable

Number of rows specified on FETCH FIRST n ROWS clause.

Contains the null value if the clause was not specified.

LAST_QDT_REBUILD_REASON QDTRBLD CHAR(2)

Nullable

Reason code for last QDT rebuild. This corresponds to column QVC22 in the STRDBMON outfile when QQRID = 1000.

Contains the null value if the statement does not use a QDT or has never had a QDT rebuilt.

STATEMENT_TEXT STMTTEXT

DBCLOB(2M)
CCSID(1200)

Text of the SQL statement.
SYSTEM_PACKAGE_NAME SYS_NAME CHAR(10) System name of the package.
SYSTEM_PACKAGE_SCHEMA SYS_DNAME CHAR(10) System name of the schema containing the package.
ACCESS_PLAN_LENGTH AP_LENGTH INTEGER Number of bytes that are used for the QDT and access plan for the statement.
End of change