Hi Michael,,

Thanks for your notes - I will examine our system in the light of this.
Your point 3 is interesting.  We were using the Type 2 OCI driver initially,
but found we couldn't read Oracle CLOB fields, the solution being to change
to Type 4 thin.  Have you perhaps been able to get Type 2 to work with
CLOB/BLOB type data?

Your other points: 1. we checked our queries using SQL*Net in the first
instance. Performance was fine.  2. The java application is basically a
debugging version of our servlet - the environment is as close as we can
manage to the servlet environment. 4. We are using a connection pool
implemented as a singleton - the pools grows and shrinks (with a default
minimum size) but the minimum size should be sufficient for our usage levels
(we monitor this).    5. My colleague who does the JDBC coding assured me he
is using parameterized JDBC calls, and not simply creating a String object
for submission.

Thanks for your help,

Mark


> -----Original Message-----
> From: Michael Bamford [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, 6 December 1999 17:58
> To:   [EMAIL PROTECTED]
> Subject:      Re: Database performance with servlets
>
> Hi Mark,
>
> Just a couple of notes.
>
> 1. Determine if the database is at fault using SQL*Net from a client
> machine
> and submitting the same SQL statement that is causing you the performance
> problems. Use utlbstat and utlestat if necessary to isolate and check
> performance of the database itself.
>
> 2. Is the Java application (on the server machine) using the same driver
> as the
> servlet that is on the NT machine?
>
> 3. Use the Type 2 OCI driver for servlets rather than the thin driver. The
> thin
> driver is better suited for applets. The OCI JDBC driver has performance
> (and
> functionality) improvements.
>
> 4. Ensure that your servlet is connecting once, say in the init() method
> rather
> than everytime that the servlet requires data from the database (eg in the
> service() method).
>
> 5. Ensure that you use parameterised JDBC calls rather than hardcoding the
> value of SQL variables in select statements.
>
> You can download the latest drivers from
> technetinside.us.oracle.com/tech/java/sqlj_jdbc/
>
> Regards
> Michael
>
> Mark Foley wrote:
>
> > Hi All!
> >
> > We are experiencing very slow response times from an Oracle database
> when
> > accessed from our servlets.  However, from a Java application on the web
> > server machine the response is much quicker.  Has anybody noticed
> anything
> > similar?
> >
> > We are using Oracle 8 on Solaris, IIS4/WebSphere2 on WinNT4 and Oracle
> thin
> > JDBC drivers.
> >
> > As a comparison I configured two linux machines to use Apache/WebSphere
> and
> > Postgresql, and found performance to be really snappy, (but then on a
> two
> > machine network that shouldn't be a surprise I suppose).
> >
> > Apart from tuning the network, the database, or the queries, does
> anybody
> > have any tips as to how they improve servlet-database performance?
> >
> > Thanks,
> >
> > Mark Foley
> >
> >
> __________________________________________________________________________
> _
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html << File: Card
> for Michael Bamford >>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to