title: Reusing a PreparedStatement multiple times
body: <p>in the case of using PreparedStatement with a single common connection without any pool, can I recreate an instance for every dml/sql operation mantaining the power of prepared statements? </p>
  
  <p>I mean:</p>
  
  <pre><code>for (int i=0; i&lt;1000; i++) {
      PreparedStatement preparedStatement = connection.prepareStatement(sql);
      preparedStatement.setObject(1, someValue);
      preparedStatement.executeQuery();
      preparedStatement.close();
  }
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>PreparedStatement preparedStatement = connection.prepareStatement(sql);
  for (int i=0; i&lt;1000; i++) {
      preparedStatement.clearParameters();
      preparedStatement.setObject(1, someValue);
      preparedStatement.executeQuery();
  }
  preparedStatement.close();
  </code></pre>
  
  <p>my question arises by the fact that I want to put this code into a multithreaded environment, can you give me some advice? thanks</p>