Home > PT > When was a query last executed?

When was a query last executed?

PSQRYSTATS table tells you about when was a particular query last executed and more details. This PSQRYSTATS table has following fileds.

OPRID
QRYNAME
EXECCOUNT  – Count of Query Execution
AVGEXECTIME  – Average Query Execution Time
AVGFETCHTIME – Average Fetch Time
LASTEXECDTTM – DateTime of Last Execution
AVGNUMROWS – Average Number of Rows Fetched
NUMKILLS – Number of Times Killed

**********************

PSQRYDEFN has a field QRYTYPE. It is a number field and It’s values are listed below.
7  – ARCHIVE
5  - PROCESS
4  – ROLEQRY
1  – QUERY

Categories: PT Tags: ,