title: Insert performance tuning
body: <p>Currently we are selecting data from one <code>database</code> and inserting it into a backup database(<code>SQL SERVER</code>).</p>
  
  <p>This data always contains more than 15K records in one select.
    We are using Enumeration to iterate over the data selected.</p>
  
  <p>We are using <code>JDBC PreparedStatement</code> to insert data as:</p>
  
  <pre><code>    Enumeration values = ht.elements(); -- ht is HashTable containing selected data.
          while(values.hasMoreElements())
          {
                  pstmt = conn.prepareStatement("insert query");
                              pstmt.executeUpdate();
          }
  </code></pre>
  
  <p>I am not sure if this is the correct or efficient way to do the faster insert.</p>
  
  <p>For inserting 10k rows it takes near about 30 min or more.
  Is there any efficient way to make it fast?<br>
  <em>Note</em>: Not using any indexes on the table.</p>