- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to identify SQL with Max Elapsed Time in 9i
Operating System - HP-UX
1823114
Members
3209
Online
109646
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2008 12:39 AM
тАО05-30-2008 12:39 AM
Hi
How to identify the Queries taking the longest time to execute (elapsed time) in Oracle 9i Database.
How to identify the Queries taking the longest time to execute (elapsed time) in Oracle 9i Database.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2008 07:26 AM
тАО05-30-2008 07:26 AM
Re: How to identify SQL with Max Elapsed Time in 9i
You will want to use statspack. The statspack snapshots can be setup for just about any time interval.
The statspack report will contains a section called "SQL Statistics" that will contain the longest running queries.
If you set the level >= to 6 you can also get the execution plan for high resource SQL statements.
The statspack report will contains a section called "SQL Statistics" that will contain the longest running queries.
If you set the level >= to 6 you can also get the execution plan for high resource SQL statements.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-30-2008 07:45 AM
тАО05-30-2008 07:45 AM
Solution
This is really a pure Oracle question and as such better posted in an Oracle forum for better results.
As jamesdba indicates, statspack is often the way to go, notably for repeated (daily?) tasks.
But there are *tons* of formal and informal tools dealing with this very question.
Google is your friend. Start with: +oracle +9i +"long running"
Sample result:
http://www.oracle.com/technology/deploy/availability/htdocs/rm_overview.html
Besides the officials tools, for a quick impression, you may want query the various V$ tables directly. That will give you an excellent sense of what data points or out there, and will give a new appreciation for the various tools.
Silly example:
SQL> set pages 9999
SQL> set lines 132
SQL> describe V$SQL
SQL> column SQL_TEXT format a50
SQL> select ELAPSED_TIME, CPU_TIME, ROWS_PROCESSED, SQL_TEXT from v$sql where rownum < 10 order by 1 desc;
Good luck!
Hein van den Heuvel
HvdH Performance Consulting
As jamesdba indicates, statspack is often the way to go, notably for repeated (daily?) tasks.
But there are *tons* of formal and informal tools dealing with this very question.
Google is your friend. Start with: +oracle +9i +"long running"
Sample result:
http://www.oracle.com/technology/deploy/availability/htdocs/rm_overview.html
Besides the officials tools, for a quick impression, you may want query the various V$ tables directly. That will give you an excellent sense of what data points or out there, and will give a new appreciation for the various tools.
Silly example:
SQL> set pages 9999
SQL> set lines 132
SQL> describe V$SQL
SQL> column SQL_TEXT format a50
SQL> select ELAPSED_TIME, CPU_TIME, ROWS_PROCESSED, SQL_TEXT from v$sql where rownum < 10 order by 1 desc;
Good luck!
Hein van den Heuvel
HvdH Performance Consulting
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP