I can't help but notice that line 14 appears to have a small but significant cost. I wonder what happens on that line?
Printable View
I can't help but notice that line 14 appears to have a small but significant cost. I wonder what happens on that line?
That small but insignificant cost is the fetch into the explicit cursor. :oQuote:
Originally Posted by padders
But for most systems all three methods are equally valid, IMHO. ;)
Thanks
Line 46 (select) is faster than line 30 (select count(*)).
This is what I expected.
Tamil
I'd still maintain that, in most cases, select count(*) is more efficient in human terms - less coding and somewhat easier to understand when you return to it two years hence - unless you spend half a screen explaining why you need that cursor!
The results prove that they are equal.
Code:use_explicit_cursor returned TRUE!!!
use_explicit_cursor Time (seconds) 0
use_select_into returned TRUE!!!
use_select_into_1 Time (seconds) 0
use_select_into returned TRUE!!!
use_select_into_2 Time (seconds) 0
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
Haven't we learned before that elapsed time means nothing? The trace matters.Quote:
Elapsed: 00:00:00.00