Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How can I find the time a query takes to complete

Re: How can I find the time a query takes to complete

From: <mpir_at_compuserve.com>
Date: Mon, 25 Jan 1999 20:31:10 GMT
Message-ID: <78ikaf$6lb$1@nnrp1.dejanews.com>


If you can run the program as a script in SQL*PLUS, try the following settings:

set time on
set timing on
set feedback on
set echo on
set pause off
@yourscript

You will at least get the elapsed time and overall execution time for your script (and maybe for each statement/block in the script). The exact format varies by platform (Windows and some Unix give elapsed milliseconds, VAX used to give parse,compile,execute and elapsed, some give execute and elapsed, etc.)

In article <78ftfg$9cj$1_at_bw107zhb.bluewin.ch>,   "Paul Martin" <prmartin_at_bluwin.ch> wrote:
> Hello
>
> Is there a way to find the time (in seconds) a query takes to run on a
> database. I know I can put the database into 'trace mode' which will
> generate a trace file. However is there any other way to time a query.
> What I would like to do is to have a program which will query something (if
> possable a table) containg the elapsed times for the query's taking place
> and send me a message if a query takes longer than a certin predefined time.
>
> Sincery
>
> Paul
>
> prmartin_at_bluewin.ch
>
>

Joseph R.P. Maloney, CCP,CSP,CDP
MPiR, Inc.
502-451-7404
some witty phrase goes here, I think.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Jan 25 1999 - 14:31:10 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US