sql_hash_value's for a session
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: sql_hash_value's for a session

  1. #1
    Join Date
    Sep 2000
    Posts
    77

    sql_hash_value's for a session

    I am trying to capture all the sql_hash_value's for a session which will be running for 5 minutes executing different sql statements. can someone please let me know if we can do this. Thanks in advance.
    Thanks

  2. #2
    Join Date
    Oct 2005
    Location
    Indianapolis
    Posts
    100
    look at v$open_cursor, or better yet - set sql trace for the session. Then you could see how long each took and what they did, including bind values.
    "False data can act only as a distraction. Therefore. I shall refuse to perceive you." - Bomb #20

  3. #3
    Join Date
    Sep 2000
    Posts
    77
    Tom, thanks for your response. How long will the entries in v$open_cursor stay (for a session) after that session disconnects?
    Thanks

  4. #4
    Join Date
    Oct 2005
    Location
    Indianapolis
    Posts
    100
    They won't - they're only there as long as the session is connected. I do believe the "open" part is relative though - I think they don't drop out of the view even if the app closes the cursors.

    If what you're wanting is to tune a process, you can't beat doing a level 12 sql trace, you'll get all the wait times and bind variables. You can look at the trace directly, or run tkprof to get a summary and find the expensive sqls.

    For a complete analysis of traces, see Cary Millsap's book Optimizing Oracle Performance - it totally changed my approach to tuning.

    Let me know if you need more info on tracing
    "False data can act only as a distraction. Therefore. I shall refuse to perceive you." - Bomb #20

Posting Permissions

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



Click Here to Expand Forum to Full Width