Hey,
I am using AppDynamics to instrument the code I have seen often in the reports that PreparedStatement.executeQuery(), PreparedStatement.executeUpdate(), resultsSet.next() is very slow taking close to 350, 500 ms whereas the query takes only 10, 15 ms.
I am not sure what is causing slowness within PreparedStatetment.
Any pointers?
The database is oracle. Also we are using DBCP 1.4 connection pool
public ResultSet executeQuery(PreparedStatement statement)
{
ResultSet results = null;
try
{
results = statement.executeQuery();
}catch(Exception e){
//Exception handling
}
return results;
}
}
Thanks!