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: Does Anyone Have A SQL Timing Script?

Re: Does Anyone Have A SQL Timing Script?

From: Vipul <vlakhani_at_interx.n.o.s.p.a.m.com>
Date: Fri, 9 Feb 2001 09:42:46 -0000
Message-ID: <960e2n$q6m$1@taliesin2.netcom.net.uk>

declare
  time1 BINARY_INTEGER;
  time2 BINARY_INTEGER;
begin
  time1 := dbms_utility.get_time;
  /* run some code here */
  time2 := dbms_utility.get_time;
  dbms_output.put_line(time2 - time1);
end;

<navaed_at_my-deja.com> wrote in message news:95vv24$5tm$1_at_nnrp1.deja.com...
>
>
> All,
>
> Has anyone created a nice script that times the
> performance of multiple SQL commands to alter a
> table? What I would like to do is run about 20
> or so Insert, Delete, and Update commands on a
> table and see how long they took to execute. The
> report that would look similar to this:
>
> Job_Id Command Success Begin_Time End_Time Durration
> ------ ------- ------- ---------- -------- ---------
> 1 Insert True 10:01:06 10:02:06 00:01:00
> 2 Insert True 10:03:06 10:04:06 00:01:00
> .
> .
> 21 Delete True 10:45:05 10:46:05 00:01:00
> 22 Delete True 10:47:05 10:48:05 00:01:00
> .
> .
> 41 Update True 11:08:03 11:09:03 00:01:00
> 42 Update True 11:10:03 11:11:03 00:01:00
>
> I know there is the Timing Utility you can set to ON,
> but how do you capture the timestamp?
>
> I am using Oracle 8i 7.1.3 Release 3 For Linux (kernel
> 2.2.16) Any help is greatly appreciated.
>
> -Dan
>
>
> Sent via Deja.com
> http://www.deja.com/
Received on Fri Feb 09 2001 - 03:42:46 CST

Original text of this message

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