Home » SQL & PL/SQL » SQL & PL/SQL » sysrefcursor printing time
sysrefcursor printing time [message #344099] Thu, 28 August 2008 15:03 Go to next message
samson_99
Messages: 3
Registered: January 2007
Location: bangalor
Junior Member
I have a procedure which returns a sys refcursor as output.
I want to know the time taken to print the sys refcusror.

I tried the following method in sqlplus.


set timing on;
var s refcursor;
exec procedure_name(23,1111,:s);
print s;


The above method displays time taken to print 's'.
But when i give set lines 10000 before "set timing on", the display time is less.
Please tell how to find correct time taken?

rgds,
samson
Re: sysrefcursor printing time [message #344101 is a reply to message #344099] Thu, 28 August 2008 15:08 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above
Re: sysrefcursor printing time [message #344129 is a reply to message #344099] Thu, 28 August 2008 16:52 Go to previous message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
print time will be hard to measure no matter what you do. There are so many variables that can change the numbers you get for timings (network hickups, data caching, too's rows buffer size) just to name a few.

However, I suggest this:

Quote:
1) set timing on
2) run the query but use cursor that gets zero rows
3) repeat #2
4) repeat #2 and record the timings
5) run the query but use a cursor that gets all your rows
6) repeat #5
7) repeat #5 and record the timings

now you can see as close as you can get to the actual "print" time.

Good luck, Kevin
Previous Topic: MULTIPLE RECIENTS USING UTL_MAIL
Next Topic: How to update table by passing table name through procedure
Goto Forum:
  


Current Time: Thu Dec 08 12:33:11 CST 2016

Total time taken to generate the page: 0.07434 seconds