Recordset Retrieval in Servlets

Dear All,

I am using a Servlet to access the Database and read a recordset. The issue I am having is that the query executes in the backend in a fraction of a second. But the fetching of data from the database to the application server takes a very long time.

I am using CallableStatement Interface and also setting a prefetch value which is appropriate. The issue is that though the number of records are few, it takes 4-5 seconds to fetch the data. This results in very poor performance of the system.

Could someone provide some help quicly since this is an extremely urgent requirement.

Thanks

Menon

[639 byte] By [rvmenona] at [2007-10-2 18:42:11]
# 1
Do one thing first access the said records using Statement or PreparedStatement and see the performance then tell me what happend. I'll try find out the problem .
davekakati_swatia at 2007-7-13 20:04:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Are you using a connection pool? Opening a new connection each time you execute a statement may very well be your bottleneck.
gimbal2a at 2007-7-13 20:04:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thanks for the replies.I am trying out the prepared statement. Shall let you know my feedback.And yes, I am using a connection pool.
rvmenona at 2007-7-13 20:04:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...