Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Measure run time for Oracle SQL

Oracle Database Tips by Donald BurlesonFebruary 17, 2015

Question:  I want to see the response time for my SQL statement and see the run time.  What tools does Oracle provide to see how long a query runs?

Answer:  For seeing the elapsed time for an individual query, you can see individual query response time in SQL*Plus with the "set timing on" command.

SQL> set timing on;
SQL> select stuff from mytab;

Elapsed: 00:00:02.82

For DBA's, Oracle has several tools for measuring system-wide response time using v$sysmetric, v$active_session_history, v$sqlarea and v$sysmetric_summary.  You can also query v$sql for the elapsed_time and executions columns for average SQL response time.

·         Application response time:  Within a working application, you can measure response time with the dbms_support package to set trace in the session that your application is running in, and then use tkprof utility to process the resulting trace file.

·    PL/SQL response time:  If you are using PL/SQL, you can use the dbms_utility package, the dbms_utility.get_time and dbms_utility.set_time procedures.

·    SQL*Forms response time:  You can also measure transaction response time in SQL*Forms using the logs.

Additional information on Oracle response time components is available HERE.

If you want to download working scripts to monitor response time, try the Oracle script download collection.


 

 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2020

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.