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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Java prepared statements

Re: Java prepared statements

From: Kevin Lidh <kevin.lidh_at_gmail.com>
Date: Tue, 21 Mar 2006 11:40:21 -0700
Message-ID: <cb4807f0603211040r24836e68nb071effa1b0232d2@mail.gmail.com>


You are correct about the reduction of the hard parses. I wrote a similar Java utility to re-execute SQL that has been run on our various databases. Once I had the mechanics of extracting the SQL out, re-running it incremented the "executions" in v$sqlarea.

On 3/21/06, Baumgartel, Paul <paul.baumgartel_at_credit-suisse.com> wrote:
>
> For you Java experts, a question:
>
> I am asking a developer to replace multiple (hundreds of thousands!)
> statements using literals with a single statement using binds. This, I
> gather, is the purpose of a Java "prepared statement". The developer tells
> me that an external program calls this Java utility, which would create the
> prepared statement each time it's called, bind the variables, and execute
> (it's a simple delete from ...where column = value).
>
> Will this result in a single SQL statement in the shared pool, hard parsed
> only once? Will it be soft parsed each time it's created? If so, that
> should achieve the desired result of reducing hard parses (this database
> suffers from very several library cache/shared pool latch contention). Is
> there a way to go even further and eliminate soft parsing, too?
>
> 9iR2 on Solaris, Oracle JDBC driver.
>
> Thanks,
>
>
> Paul Baumgartel
> paul.baumgartel_at_credit-suisse.com
> 212.538.1143
>
>
>
> ==============================================================================
> Please access the attached hyperlink for an important electronic
> communications disclaimer:
>
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
>
> ==============================================================================
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 21 2006 - 12:40:21 CST

Original text of this message

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