title: Oracle Open Cursor Execution time
body: <p>I'm trying to figure out how long this cursor takes to execute. However, I'm getting the same start and end time.</p>
  
  <p>Please note I didn't include the actual sql statement. But I'm sure it is takes quite long time to execute.</p>
  
  <pre><code>PROCEDURE GetData (p1 IN VARCHAR2,myREFCURSOR OUT SYS_REFCURSOR)
  IS 
      DynamicStatement       CLOB;
  BEGIN
      INSERT INTO TimeTable VALUES ('StartTime',SYSDATE);
      COMMIT;
  
      OPEN myREFCURSOR FOR DynamicStatement;
  
      INSERT INTO TimeTable VALUES ('EndTime',SYSDATE);
      COMMIT;
  END;
  </code></pre>