How can I use pyodbc to create batched inserts
I'm using pyodbc (and Python) to load large amounts of data into Vertica. The Vertica driver is going to change in the next couple of months so I don't want to lock myself into COPY v. LCOPY.
I've read how to create batched inserts and I think I'm doing it correctly but it's still not performing the inserts in a batch.
Here's what I'm doing
I've read how to create batched inserts and I think I'm doing it correctly but it's still not performing the inserts in a batch.
Here's what I'm doing
- Opening a connection with autocommit turned off
- Opening a transaction
- Running parameterized, prepared insert statements (pyodbc.execute)
- Committing the transaction
0