Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: JDBC Driver extremely slow??
unlimited.newshosting.com wrote:
> Hi,
> I try to run a query on Oracle Enterprise v10.2.0.1.0 when I execute it on
> iSQL+ it returns the results in milisecs. However when I execute the same
> query using the JDBC driver Oracle tries too hard to process it (150 secs).
> Query advisor warns me about the execution speed and I obviously see the cpu
> usage increases.
> Does anyone has an idea?
>
> Thanks..
> V. Oguz TOKMAK
Are you sending the same SQL? *Exactly* the same SQL? Or are you sending
the JDBC as a prepared statement with parameters? Try a plain statement
first with the SQL you send via SQL-PLUS and say if it's slower. If you
were doing a parameterized PreparedStatement, show us that JDBC, and
tell us the declared data types being referred to in the DBMS. The issue
may be that there is an implicit data conversion, which unless it's done
during the compilation of the SQL (such as with SQL-PLUS or a plain
Statement) it will prevent the DBMS from using the best indexes.
HTH,
Joe Weinstein at BEA Systems
Received on Mon Mar 06 2006 - 10:19:38 CST