PS Query & SQL

 View Only
  • 1.  Query Statistics - improve performance

    Posted 08-18-2025 09:43 AM

    We want to always run Query Statistics so that we can better manage queries. Specifically, we want to identify:

    1) which queries are rarely run or haven't been run in a long time - and perhaps delete them

    2) which are run most frequently or take a long time to run - and perhaps tune them for better performance

    We turned on query statistics, but we have several queries that run upon login for students, and when we had heavy student traffic, Query Statistics was overwhelmed, and slowed our system dramatically, so we've turned it off since then.

    I posted a PeopleSoft Idea to improve Query Statistics Performance, and got some great feedback, though no activity from Oracle. I would much appreciate more upvotes and comments.



    ------------------------------
    Kevin Shalla
    Director of Technology
    University of Chicago
    ------------------------------
    Alliance 2026 Registration is Open!


  • 2.  RE: Query Statistics - improve performance

    Posted 08-18-2025 09:50 AM

    I voted and commented.



    ------------------------------
    Daniel Labrecque
    Senior 2 Business Systems Analyst/Functional Architect
    University of Nevada-Las Vegas
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 3.  RE: Query Statistics - improve performance

    Posted 08-18-2025 10:01 AM
    I have voted as soon as it was submitted ��

    Mital Naik

    UT Arlington

     




    Alliance 2026 Registration is Open!


  • 4.  RE: Query Statistics - improve performance

    Posted 08-19-2025 06:16 PM
    I voted, that would be a great help.  Our office also has a Query Stats query we built that shows a list of public queries, some overall info, an execution count, info about the last updates, creation date, and last run date.  We run this once a year, find any queries that haven't been used in the past year, and reach out to the owner/creator to see if they need to be saved.  Anything that nobody wants to save or that is now obsolete gets deleted.  This has helped a lot in helping search for queries that are actually useful and accurate.

    Diane Jensen Donald, MPA (she/her)
    Management Systems Coordinator
    Student Financial Services Boise State University
    Phone: (208) 426-2815
    Mail: 1910 University Drive, Boise, ID 83725-1246
    Location: Administration Building Room 101
    Schedule a meeting with me: 30 minutes || 60 minutes


    On Mon, Aug 18, 2025 at 8:00 AM Mital Naik via Higher Education User Group <Mail@heug.org> wrote:
    I have voted as soon as it was submitted �� Mital Naik UT Arlington -posted to the "PS Query & SQL" group
    Higher Education User Group

    PS Query & SQL

    Post New Discussion
    Re: Query Statistics - improve performance
    Reply to Thread
    Aug 18, 2025 10:01 AM
    Mital Naik
    I have voted as soon as it was submitted ��

    Mital Naik

    UT Arlington

     



      Reply to Community   Reply to Sender via Email   View Thread   Recommend  




     
    You are subscribed to "PS Query & SQL" as dianedonald@boisestate.edu. To change your subscriptions, go to My Subscriptions. To remove yourself from this community discussion, you can unsubscribe at any time.
    Alliance 2026 | March 8-11, 2026 | Orlando, FL



    Original Message:
    Sent: 8/18/2025 10:01:00 AM
    From: Mital Naik
    Subject: RE: Query Statistics - improve performance

    I have voted as soon as it was submitted ��

    Mital Naik

    UT Arlington

     




    Original Message:
    Sent: 8/18/2025 9:50:00 AM
    From: Daniel Labrecque
    Subject: RE: Query Statistics - improve performance

    I voted and commented.



    ------------------------------
    Daniel Labrecque
    Senior 2 Business Systems Analyst/Functional Architect
    University of Nevada-Las Vegas
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------
    Alliance 2026 Registration is Open!


  • 5.  RE: Query Statistics - improve performance

    Posted 08-20-2025 09:55 AM

    voted!



    ------------------------------
    HEUG Community of Practice
    Reporting, Analytics, and Data Governance Subcommittee

    Anna Kourouniotis MA
    Database Analyst II
    Duke University
    ------------------------------

    Alliance 2026 Registration is Open!


  • 6.  RE: Query Statistics - improve performance

    Posted 08-21-2025 10:36 AM

    We saw the same performance degradation issues when we had Query Statistics enabled several years ago. I think we may still have it on a few queries. But for the most part, it's turned off. 



    ------------------------------
    Scott Frey
    Senior Data Analyst - Human Resource Information Systems
    University of Colorado System
    ------------------------------

    Message from the HEUG Marketplace:
    ------------------------------
    Find, Review, and Engage with Higher Education-focused solution providers, products, and services using the HEUG Marketplace.
    ------------------------------

    Alliance 2026 Registration is Open!


  • 7.  RE: Query Statistics - improve performance

    Posted 08-22-2025 09:45 AM
      |   view attached
    A most fascinating discussion I return to after a week away.

    We have just turned on Query Stats and are reviewing it.  I must say that for the things I'm interested in being able to review / accomplish with such a tool, I was able to "break it" within 3 minutes.  No joking.  I've spent maybe a total of 5 minutes so far reviewing it.

    With that said - what am I interested in with such a tool?  A rather robust and complete auditing capability.  So, when I said that I could "break it", that is referring to the ease with which I was able to "hide my tracks".  Are there additional capabilities which are in the tool that I'm missing / we haven't turned on?  Perhaps.  I'm sure that more than 5 minutes of investigation would be worthwhile.

    Some time ago, I wrote up my cut at the capabilities I'd like to see for auditing / tracking in Query Manager.  I'm attaching that document - and would be most interested in thoughts and comments from this community.  Has anyone done anything along these lines?  (As I take another look at the document, having the ending date / time would also be good - would be nice to know how long the SQL ran for!)

    I would appreciate your comments and insights.

    Thanks in advance for the time and effort you put into looking at this!

    David Ehrlich | Senior Business System Analyst

    Duke University | Student Information Services & System (SISS)

    david.ehrlich@duke.edu | 919-684-1206

    www.sissoffice.duke.edu





    Attachment(s)

    Alliance 2026 Registration is Open!


  • 8.  RE: Query Statistics - improve performance

    Posted 08-25-2025 08:38 AM
    David,
    Thank you for sharing! I haven't explored any customizations at my institution yet, as my first preference would be for Oracle to address the issues with the Query Administration tool.
    I agree with all the fields you listed for the log table, including the duration of time the query ran. Additionally, I'm interested in capturing the type of query (Public or Private) and understanding how many users have access to this query, whether through a security role or individual access.

    Mital Naik

    UT Arlington 




    Alliance 2026 Registration is Open!


  • 9.  RE: Query Statistics - improve performance

    Posted 08-25-2025 12:18 PM

    Mital, I like your enhancement of a list of who has access to a particular query. Maybe that should be a separate Ideas Lab suggestion.



    ------------------------------
    Kevin Shalla
    Director of Technology
    University of Chicago
    ------------------------------

    Alliance 2026 Registration is Open!


  • 10.  RE: Query Statistics - improve performance

    Posted 08-25-2025 11:41 AM

    David,

    I think your suggested improvements are interesting, particularly if your interest is auditing. As far as breaking it, it seems like you're mostly pointing out that you can query data without statistics if you don't save your query before running. As you point out, many details are missing, like the run option and there's no record of actual SQL run. While all this is true, I think it deserves a separate discussion topic, as I believe the intent of the delivered utility strays from your interest.

    Query Statistics is not targeted, but enabled for every query - that's what I'm hoping we can change to improve performance.

    The fields in PSQRYSTATS tracked during every named query execution lead me to believe that it is designed to help identify saved queries that run frequently or rarely, were run recently or not, take a long time to run, or have been killed frequently, which would help identify queries that need to be culled or tuned.

    As a next step in helping tune queries, you can turn on logging for specific queries. This is stored in PSQRYEXECLOG, which contains a row for each execution, containing who ran it, how long it ran, how many rows, if it exceeded the max rows, and a killed reason. 

    Perhaps your enhancements would involve another setting "enhanced security auditing" checkbox that enforces much more than the delivered utility, and includes additional fields.



    ------------------------------
    Kevin Shalla
    Director of Technology
    University of Chicago
    ------------------------------

    Alliance 2026 Registration is Open!