oracle query execution time

I would like to get my guery execution time from Oracle DB. I dont want the time when Oracle finish to print results. In MySQL it is easy to get execution time from shell, but in SQL Plus there are no such thinks.

Thanks for any help!

This question and answers originated from www.stackoverflow.com
Question by (8/24/2010 5:27:26 PM)

Answer

One can issue the SQL*Plus command SET TIMING ON to get wall-clock times, but one can't take, for example, fetch time out of that trivially.

The AUTOTRACE setting, when used as SET AUTOTRACE TRACEONLY will suppress output, but still perform all of the work to satisfy the query and send the results back to SQL*Plus, which will suppress it.

Lastly, one can trace the SQL*Plus session, and manually calculate the time spent waiting on events which are client waits, such as "SQL*Net message to client", "SQL*Net message from client".

Answer by

Find More Answers
Related Topics  oracle  query  execution
Related Questions
  • Query execution time in Oracle SQL Developer

    I know I can use set timing on to see how long it took to execute a query after the execution is finished. But is it possible to see current execution duration in Oracle SQL Developer while the q…
  • MySql query execution time

    I am using MySQL Workbench on Windows. How do I find out the time taken to execute a query like Select * from employers where employerid > 200 Is there a statement I can enter that returns…
  • HUGE query execution time difference between oracle 10g and 9i

    I'm running the following query: SELECT * FROM all_tab_cols c LEFT JOIN all_varrays v ON c.owner = v.owner AND c.table_name = v.parent_table_name AND c.column_name = v.parent_table_column …
  • Query Execution Time

    I am querying a SQL server 2008 database table having more than 500 million records. The query I fired to move around 10 million records to temp table took 9 hours. Similar query I fired which has b…
  • Get and store execution time in Oracle

    Is there a way to get and store the execution time of a select? select * from table1 Thank you, Radu.
  • Oracle-style execution hints

    When you write rather complex SQL for Oracle, sooner or later you will have to apply the odd execution hint because Oracle can't seem to figure out the "best" execution plan itself. http://downl…
  • Oracle hierarchical query execution steps

    Here's the documentation: http://download-east.oracle.com/docs/cd/B12037_01/server.101/b10759/queries003.htm Here's the execution order it describes: A join, if present, is evaluated first, …
  • mysql query execution time | reduce query

    I have a query which let me to change users order. here is my query: update test set orderID = case orderID when (select orderID from ( select * from test where orderID > ( select …
  • how to generate execution plan for oracle loop

    How can I generate execution plan for an oracle loop query like below: BEGIN FOR L IN (SELECT FIRST_NAME, LAST_NAME, SOME_ID FROM TABLE1) LOOP INSERT INTO TABLE2 (FIRSTNAME, LASTNAME) (S…
  • How to get Oracle execution plan xml through jdbc

    I need to parse execution plans for queries and extract data out of them for my application. While this answer JDBC Oracle - Fetch explain plan for query helped me fetch a text execution plan throug…