Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: cached cursor - eliminatnig soft parses
"Ed Stevens" <nospam_at_noway.nohow> wrote in message
news:og04b05vpsfdqu9megdaptchlt977k4gst_at_4ax.com...
> I am preparing a series of presentations for our developers, to give
> them some 'best practices.' The first of these is based on Tom Kyte's
> demonstation of the impact of using (or not using!) bind variables. I
> have the demo and presentation put together, but there are some areas
> where I anticipate questions for which I don't quite have the depth of
> understanding to provide adequate answers.
>
> Of particular concern is the discussion of avoiding soft parses by
> using cursor caching. Think I understand the principles, and of
> course have Kyte's example in PL/SQL. However most of our projects
> are being coded in either VB or Java (and one in Micro Focus COBOL),
> so I'd like to be able to provide at least some code samples, if not
> live demos, in those languages. To complicated things further, while
> COBOL is my first language and I am reasonably facile in VB, I don't
> know squat about Java.
>
>
Better method (and Tom does talk about this) is to open the cursor 1 time
and keep reusing it. So you have a parse, a bind (bind variables, and an
execute. Then rebind (respecify the bind variables) and execute again.
Then you don't have to parse the statement, not even a soft parse. Very
scalabe and high performance.
Jim
Received on Mon May 24 2004 - 10:43:07 CDT