PS Query Statistics

All,

Here’s a quick code snippet that you can run to get details on how many times a PS Query has been run, the most recent date time it was run and so on –  the table to use is PSQRYSTATS.

SELECT DISTINCT a.qryname AS "Query",
B.DESCR AS "Query Description",
SUM(a.execcount) AS "# of Runs",
MAX(a.lastexecdttm) AS "Last Run Date"
FROM PSQRYSTATS A,
PSQRYDEFN B
WHERE A.QRYNAME = B.QRYNAME
AND a.qryname LIKE 'X_%'
GROUP BY a.qryname,
b.descr
ORDER BY 3 DESC;

Hope this helps! 🙂

 

Advertisements

About Manikandan Surendren

A PeopleSoft Techno-functional Consultant. An engineering graduate in Computer Science. Technology Enthusiast. Movie freak. Gadget geek.
This entry was posted in Code, Oracle, PeopleSoft, Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s