@Profiler.profile
def test_bulk_insert_dictionaries(n):
 for i in range(n):
  session = Session(bind=engine)
  session.bulk_insert_mappings(Customer, [dict(name=('customer name %d' % i), description=('customer description %d' % i))])
  session.commit()

@ Profiler . profile def test_bulk_insert_dictionaries ( n ) : for i in range ( n ) : session = Session ( bind = engine ) session . bulk_insert_mappings ( Customer , [ dict ( name = ( 'customer name %d' % i ) , description = ( 'customer description %d' % i ) ) ] ) session . commit ( )
individual insert/commit pairs using the "bulk" api with dictionaries .