I am using JDBC api to call a store procedure. Which returns a cursor. Problem I am facing is, first开发者_C百科 two call of ResultSet.next() take more then a minute to return result. After then it take less then 2 seconds. Is it the case of every one or need to customize the call.
OracleCallableStatement cs = (OracleCallableStatement)DBTransaction.createCallableStatement("begin " + "sql_package.stored_proc(?,?,?,?,?,?)" + "; end;", DBTransaction.DEFAULT);
rs = cs.getCursor(1);
rs.next();// The culprit.
JAVA 1.6, Oracle 11i
It was Query what was taking time.
精彩评论