Re: JDBC Problem



On Nov 5, 11:45 pm, xhy_China <xuhaiyan...@xxxxxxxxx> wrote:
Hi All,

I hava a problem about speed of database enquiry.

Problem:
It's a B/S application. Now I hava a database enquiry.
The statement stmt.executeQuery(sSQL) used long time(about 30s). The
return result have about 500 rows. If I copy the SQL to database
utilities to run it, itruns very fast(about 1-2s), why?? In another
function it also use stmt.executeQuery(sSQL)(returns about 500 rows),
it runs fast, so I dont think the reason is network between client,
database, server.
Could any one tell me why?? And how to change this
situation??
Thx for you suggestion!

Are you using a PreparedStatement? What JDBC driver and DBMS are you
using?

Joe Weinstein at BEA Systems

.



Relevant Pages

  • JDBC Problem
    ... I hava a problem about speed of database enquiry. ... It's a B/S application. ... database, server. ...
    (comp.lang.java.databases)
  • JDBC problem
    ... I hava a problem about speed of database enquiry. ... It's a B/S application. ... database, server. ...
    (comp.lang.java.programmer)
  • Re: JDBC problem
    ... I hava a problem about speed of database enquiry. ... time it alone (i.e. put some timing code ... if there is still a problem post the actual code in sSQL. ...
    (comp.lang.java.programmer)