Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > Re: REF CURSOR
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 7 Topic 6956 of 7131
Post > Topic >>

Re: REF CURSOR

by tool@[EMAIL PROTECTED] (Dan Blum) Jun 17, 2008 at 04:36 PM

Mtek <mtek@[EMAIL PROTECTED]
> wrote:

<snip>

> > If you are using dynamic SQL and need to loop through the results then
you
> > probably do need to open an explicit cursor. And you will need to
close and
> > re-open it when the statement changes in any way.
> >
> > If you were just changing the bind variable values, you could avoid
some of
> > the overhead by using DBMS_SQL, but that will not help if the
conditions actually
> > change.
> >
> > --
> >
_______________________________________________________________________
> > Dan Blum                                                
t...@[EMAIL PROTECTED]
> > "I wouldn't have believed it myself if I hadn't just made it up."

> Of course, the other option is to have a couple of cursors, and pass
> parameters so I do not have to close and open them.....

You could do that, but whether it's worth it or not depends on how often
you will
be opening and closing the same statements, and how many different
statements you
need. If you are going to be running the same statements (with different
parameters)
thousands of times, and performance is im****tant, you can definitely save
some 
overhead by using DBMS_SQL (it does much less parsing that way, which
reduces 
latching). However, using DBMS_SQL requires more coding than just opening
cursors.

-- 
_______________________________________________________________________
Dan Blum					         tool@[EMAIL PROTECTED]
"I wouldn't have believed it myself if I hadn't just made it up."
 




 7 Posts in Topic:
REF CURSOR
Mtek <mtek@[EMAIL PROT  2008-06-17 06:47:14 
Re: REF CURSOR
tool@[EMAIL PROTECTED] (  2008-06-17 14:14:09 
Re: REF CURSOR
Mtek <mtek@[EMAIL PROT  2008-06-17 07:19:55 
Re: REF CURSOR
tool@[EMAIL PROTECTED] (  2008-06-17 15:30:21 
Re: REF CURSOR
Mtek <mtek@[EMAIL PROT  2008-06-17 08:50:22 
Re: REF CURSOR
Mtek <mtek@[EMAIL PROT  2008-06-17 08:51:45 
Re: REF CURSOR
tool@[EMAIL PROTECTED] (  2008-06-17 16:36:43 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Sep 7 19:09:25 CDT 2008.