Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Cursors : parameters vs bind variables

Re: Cursors : parameters vs bind variables

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sun, 3 Nov 2002 19:57:33 -0000
Message-ID: <aq3v8o$2dp$2$8302bc10@news.demon.co.uk>

In terms of parsing, they are pretty much identical, as a parameter passed to a cursor is a bind variable by the time the SQL hits the database.

There are some overheads in the PL/SQL layer relating to scope checking - i.e. Oracle making sure that a variable that magically appears in the middle of a cursor is legal at compile time and some overhead for stepping backwards through stacks (or possibly heaps) to locate it at run-time.

--
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar dates:
(see http://www.jlcomp.demon.co.uk/seminar.html )

____USA__________November 7/9   (Detroit)
____USA__________November 19/21 (Dallas)
____England______November 12/14

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html





Le JeanMimi wrote in message ...

>I'm reading the Oracle PL/SQL User's Guide and i've got a small
>question with cursors.
>
>What are the differences between :
>- cursors using bind variables
>- passing cursor parameters
>(- or even cursors referencing variables in the current pl/sql scope)
>
>in terms of parsing, performance, concepts ...
>
>They seems very similar to me but i feel that bind variables are more
>powerful.
>Can I have some explanations ? (sorry if it's a dumb question)
>
>TIA
>
>Jean-Michel
Received on Sun Nov 03 2002 - 13:57:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US