sysrefcursor printing time [message #344099] |
Thu, 28 August 2008 15:03  |
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 #344129 is a reply to message #344099] |
Thu, 28 August 2008 16:52  |
 |
Kevin Meade
Messages: 2103 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
|
|
|