Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ADO & PL/SQL: Return cursor from procedure (performance question)
"Eric Fortin" <emfortin_at_comcast.net> wrote in message news:vuXbb.134595$mp.66950_at_rwcrnsc51.ops.asp.att.net...
> Pseudo...
> ...
> create package...
>
> type retcursor is ref cursor;
> ...
>
> procedure GetEmps(p_ID in number, p_cursor out retcursor)
> ...
> open p_cursor for select * from emp where empno = p_ID;
> ...
> end...
>
> Will this perform as well as using bind variables?
If you write it this way, yes:
open p_cursor for
'select * from emp where empno = :zot'
using p_ID;
The alternative is of course to use the new parameters since 8i to force "bind variable" processing in non-bind variable dynamic SQL.
http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76961/ch126.htm#72489 (watch 4 URL wrapping)
But you gotta make sure the "dynamic" is not *too* dynamic...
-- Cheers Nuno Souto wizofoz2k_at_yahoo.com.au.nospamReceived on Tue Sep 23 2003 - 08:52:48 CDT