Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2008
    Posts
    136

    Unanswered: how to get top 5 time consuming query or cost of query

    Hi,
    Is there any way to fine out top 5 most time consuming query or top five most cost of query. Please reply ASAP.

    I can get info from update statement monitor switch but its very tough to see all query time because there are many query.


    Thanks & Regards
    Pawan

  2. #2
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    How else could you figure out the top n if you don't want to monitor all queries? How should DB2 collect the information you desire?
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  3. #3
    Join Date
    Mar 2008
    Posts
    136
    if i update monitor switch using statement on
    then i can get all dynamic quering in particular time and a huge file of many queries....for getting the most time consuming query I need to go through every query time in this file ...that is also time consuming and hectic.

    so is there any way in db2 for getting list of top 5 time consuming dyanmic query executed in last 24 hrs???


    any command and anything???plz reply ASAP..



    thanks
    pawan

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    I don't know the structure of the file you mentioned - exactly which steps do you use to collect the information?

    Why don't you just use the snapshot table functions to get the statement information, and apply some simple GROUP BY, SUM, and FETCH FIRST clauses to filter the data?
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •