Home » SQL & PL/SQL » SQL & PL/SQL » select query
select query [message #276531] Thu, 25 October 2007 07:38 Go to next message
balajisundar
Messages: 29
Registered: October 2007
Junior Member
Hi,

Can any body let me know how to find out the time consumed by a select query...? This query would probably fetch more than 100 thousand records in a table.

Thanks

Balaji
Re: select query [message #276534 is a reply to message #276531] Thu, 25 October 2007 07:48 Go to previous messageGo to next message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:

how to find out the time consumed by a select query

Where and when?
From the current session and from outside?
Now and for the past queries?

And as always post your Oracle version with 4 decimals.

Regards
Michel
Re: select query [message #276535 is a reply to message #276531] Thu, 25 October 2007 07:49 Go to previous messageGo to next message
joy_division
Messages: 4642
Registered: February 2005
Location: East Coast USA
Senior Member
You probably have to be more specific what you mean by how much time (cpu time, clock time, etc.), but do a SET TIMING ON then run your query and tell if that's what you want.
Re: select query [message #276539 is a reply to message #276531] Thu, 25 October 2007 07:53 Go to previous messageGo to next message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
I usually use:

set autotrace trace stat
set timing on

then run the query. It stops any output reaching the screen and gives you the time taken to run the query + execution stats.

[Updated on: Thu, 25 October 2007 07:53]

Report message to a moderator

Re: select query [message #276545 is a reply to message #276531] Thu, 25 October 2007 08:13 Go to previous message
balajisundar
Messages: 29
Registered: October 2007
Junior Member
Hi All,

Thank You so much. This is my first question to the Forum and i got the solution.

SET TIMING ON is what i was looking out for and it solved my need.


As well Iam using Oracle SQL Developer to execute the SQL part and by default it provides the time taken for each query that is executed. Smile

Regards,
Balaji
Previous Topic: Export Query Result to text file
Next Topic: Column not allowed here
Goto Forum:
  


Current Time: Wed Dec 07 20:41:39 CST 2016

Total time taken to generate the page: 0.42494 seconds