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
- Opening a connection with autocommit turned off
- Opening a transaction
- Running parameterized, prepared insert statements (pyodbc.execute)
- Committing the transaction
I'm seeing the insert statements with no commits until the end but it's still slow relatively slow. Is there another pyodbc command I should be running to do true batched inserts?