title: resultset.next taking long time
body: <p>I am using Oracle JDBC connection and executing procedure using CallableStatement.</p>
  
  <pre><code>procedureCall.executeUpdate(); // That took 149 milliseconds
  resultSet.next() // That took 5287 milliseconds
  </code></pre>
  
  <p>Query execution time is ok. But when i do resultSet.next, it is taking long time.</p>
  
  <p>Can Anyone please tell why such behavior is happening.</p>
  
  <p><strong>EDIT</strong></p>
  
  <pre><code>try (CallableStatement procedureCall = connection.prepareCall(PROC_NAME)) {
  procedureCall.setLong("param",value);
  procedureCall.registerOutParameter("param1",OracleTypes.CURSOR)
  procedureCall.registerOutParameter("param2",OracleTypes.CURSOR)
  procedureCall.executeUpdate();
  resultSet = (ResultSet) procedureCall.getObject("param1");
  while(resultset.next()){
  }
  resultSet.close();
  resultSet = (ResultSet) procedureCall.getObject("param2");
  while(resultset.next()){
  }
  resultSet.close();
  }catch(SQLException e){
  }finally {
       if (resultSet != null) {
           try {
                 resultSet.close();
               } catch (SQLException ex) { }
              }
          }
  </code></pre>
  
  <p><strong>Workaround</strong>
  Also tried <code>resultset.setFetchsize(2);</code> and <code>if(resultset.next()){}</code>
  Still taking same time.</p>