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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Oracle's support of PreparedStatement

Re: Oracle's support of PreparedStatement

From: Alain Kreienbuhl <alain.kreienbuhl_at_fisystem.com>
Date: Sat, 21 Jul 2001 23:51:54 GMT
Message-ID: <3B29BC83.9F3318CE@fisystem.com>

Joseph Weinstein a écrit :

>
> No need to worry. The point is that usually the DBMS and driver will cooperate to
> provide you the benefit of prepared statements as soon as you re-use a particular
> statement. Make sure you ask some more questions about this cache, because if you're
> doing any transactional work, every statement you use has to be associated with
> a single connection. It seems random and unfair if some connections have more cached
> prepared statements than others...
> Joe
>

Regarding the cache you're right about the random and unfair... but that I'll live with. Regarding Oracle's preparedStatement I'm juste looking for a "Yes we support PreparedStatement" in some Oracle Documentation.

Thanks

Alain.

>
> >
> > Alain.
> >
> > Joseph Weinstein a écrit :
> >
> > > Alain Kreienbuhl wrote:
> > > >
> > > > Thanks for your reply.
> > > >
> > > > I'm very much aware of the JDBC Developper's guide and reference (540 pages).
> > > > There is nothing mentioning that preparedStatement are really repared once.
> > > > The reason my asking this is because I Merant mentioned that :
> > > > con.prepareStatement("invalid sql code")
> > > >
> > > > does not throw any SQLException nor SQLWarning. Therefore I'm wondering if
> > > > preparedStatement are really being prepared once.
> > > >
> > > > Alain.
> > >
> > > Hi Alain. It is possible that driver caches the SQL and maybe any subsequent
> > > parameters, and sends them all at one time to the DBMS in response to the
> > > first execute() call. At that time the DBMS will parse the SQL. It would be then
> > > that it would throw an exception for bad SQL. Subsequent execute()s would use
> > > the query plan from the first parse/exec of the SQL, and the driver might only
> > > have to send the new parameter values.
> > > Joe
> > >
> > > >
> > > > Sybrand Bakker a écrit :
> > > >
> > > > > "Alain Kreienbuhl" <alain.kreienbuhl_at_fisystem.com> wrote in message
> > > > > news:3B27945B.5144F725_at_fisystem.com...
> > > > > > Hello,
> > > > > >
> > > > > > Are preparedStatement supported in the following configuration:
> > > > > > - JDBC Driver 8.1.(6-7)
> > > > > > - RDMS Oracle 8.0.5
> > > > > >
> > > > > > By supported I mean, are the query really prepared once (for a given
> > > > > > scope, method scope or longer if connection pool + preparedStatement
> > > > > > pool are used).
> > > > > >
> > > > > > Where can I found official information about this.
> > > > > >
> > > > > > Thanks .
> > > > > >
> > > > > > Alain.
> > > > > >
> > > > > >
> > > > >
> > > > > In Oracle's jdbc documentation, obviously.
> > > > > Although running a higher version driver against a lower version database
> > > > > (which has also been desupported) is just asking for problems.
> > > > >
> > > > > Hth,
> > > > >
> > > > > Sybrand Bakker, Oracle DBA
> > >
> > > --
> > >
> > > PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
> > > for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
> > > We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
> > > Send resumes to joe_at_bea.com
>
> --
>
> PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
> for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
> We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
> Send resumes to joe_at_bea.com
Received on Sat Jul 21 2001 - 18:51:54 CDT

Original text of this message

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