title: Java preparedstatement slower than sql developer
body: <p>I'm performing a call to an Oracle database using java and JDBC like this:</p>
  
  <pre><code>PreparedStatement prep=c.prepareStatement(
      "SELECT a.user FROM  data a where a.start_time &gt;=? " +
      "and a.end_time &lt;=? and a.operation='UPDATE USER'");
  
  prep.setString(1, 02-MAR-15);
  prep.setString(2, 03-MAR-15);
  ResultSet rs=prep.executeQuery();
  </code></pre>
  
  <p>This query is taking over 44 seconds in returning 560 values.</p>
  
  <p>Here is the same query run in SQL Developer:</p>
  
  <pre><code>SELECT a.user FROM  data a where a.start_time &gt;='02-MAR-15' 
  and a.end_time &lt;='03-MAR-15' and a.operation='UPDATE USER';
  </code></pre>
  
  <p>This one takes less than 4 seconds.</p>
  
  <p>I don't understand why the second one goes so much faster.</p>