Home » Developer & Programmer » Forms » how to find out - time taken by a SQL query
how to find out - time taken by a SQL query [message #85440] Sat, 26 June 2004 03:08 Go to next message
Puneet Bhatia
Messages: 7
Registered: February 2004
Junior Member
Dear friends,

I have forms 4.5 using which I am running a sql query to generate a report (by calling the .sql file using host command).  could you please advise how can I find out the time taken by this query to run. The time varies depending upon the number of records to be fetched.

Pls advise.

rgds

PB

 

 

 
Re: how to find out - time taken by a SQL query [message #85492 is a reply to message #85440] Fri, 02 July 2004 03:58 Go to previous message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
you can use
1) set timing on

or

2)
var x varchar2(20)
begin
select sysdate into :x from dual;
end;
/
select <cols> from
;--ur select query

var y number;
begin
select sysdate - to_date(:x) into :y from dual;
end;
/
print y

3)
you can write a PL/SQL Block
such that it will find the stat date and end date
then you can take the diff as time. but for the report you should write a cursor and have to print using dbms_output.

by
vamsi
Previous Topic: disable the menu item.
Next Topic: reading which key was pressed
Goto Forum:
  


Current Time: Thu May 16 02:25:32 CDT 2024