title: Is it faster to batch my inserts when using SQLAlchemy bulk_insert_mappings()?
body: <p>I've got 500K rows I want to insert into PostgreSQL using SQLAlchemy. </p>
  
  <p>For speed, I'm inserting them using <code>session.bulk_insert_mappings()</code>. </p>
  
  <p>Normally, I'd break up the insert into smaller batches to minimize <code>session</code> bookkeeping. However, <code>bulk_insert_mappings()</code> uses <code>dicts</code> and bypasses a lot of the traditional session bookkeeping. </p>
  
  <p>Will I still see a speed improvement if I break the insert up into smaller discrete batches, say doing an insert every 10K rows? </p>
  
  <p>If so, should I close the PG transaction after every 10K rows, or leave it open the whole time?</p>