Informix

Informix

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  list sql statements

    Posted Fri September 16, 2022 04:40 AM
    Hello

    Usually i use onstat -g top to figure out the most consuming CPU sessions, but i need also to list all sql statements (not onstat -g stm with only thos on cache), with there costs, duration,

    prefectly , these informations  (sessid, sql statement, cost, duration , cpu consuming)


    Thanks in advance

    ------------------------------
    John Smith
    ------------------------------

    #Informix


  • 2.  RE: list sql statements

    Posted Fri September 16, 2022 05:38 AM
    For retrospective consideration, Query drill-down probably is what you're after.

    For monitoring and investigating an ongoing cpu consumption problem, you could use 'onstat -g ses active' or 'onstat -g ses running', possibly with -r option (which now even allows sub-second and zero-wait repeat rates), providing immediate insight into what SQL it is that's keeping your instance so busy.  (Instead of 'ses' also 'sql' is possible, to avoid all the session information.)

    ------------------------------
    Andreas Legner
    ------------------------------



  • 3.  RE: list sql statements

    Posted Fri September 16, 2022 06:00 AM
    Hello and thanks :)
    i totally forgot sql trace, but can i activate it to have the informations without impacting users activitiy ? sqltrace= low is sufficient ?

    ------------------------------
    John Smith
    ------------------------------



  • 4.  RE: list sql statements

    Posted Fri September 16, 2022 07:07 AM
    John: 
    Check out the SQLTRACE feature.

    Art

    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------