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: AV <avek_nospam__at_videotron.ca>
Date: Sat, 21 Jul 2001 23:51:41 GMT
Message-ID: <iFSV6.19381$Cl1.1708065@wagner.videotron.net>

+0.02 CAN$ ...also timeframe can be considered. Once, I was chasing jdbc sql request inside Oracle (815). Our DBA was able to find some in 3-7 minutes, but most requests were lost in first 60 seconds. As I was told, it depends on db load, size of some segments, and most important: on moon position against Saturn. My understanding was that cached parsed requests are not
connected to particular prepStatement,
Connection or user. Thus, looks like caching PreparedStatements java objects in
Connection pool (or in jdbc driver) saves memory and time in java side, rather than avoids re-parsing.

AlexV

"Joseph Weinstein" <joe_at_bea.com> wrote in message news:3B27A2CD.E6C02562_at_bea.com...
>
>
> 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
Received on Sat Jul 21 2001 - 18:51:41 CDT

Original text of this message

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