How to find bad row with db api executemany()?

Roy Smith roy at panix.com
Fri Mar 29 23:09:37 EDT 2013


In article <mailman.3980.1364611804.2939.python-list at python.org>,
 Chris Angelico <rosuav at gmail.com> wrote:

> Especially facepalm because there's some way to do this that's faster
> than straight INSERT statements, and it's not clearly documented as
> "hey, guys, if you want to dump loads of data in, use COPY instead"
> (it might be that, I don't know, but usually COPY isn't directly
> transliterable with INSERT).

We're actually using REPLACE INTO.  For the initial data load, we could 
just as well do INSERT, but we need the REPLACE functionality as we roll 
in the daily incremental updates.

This also explains why, even after provisioning our RDS instance for 
2000 IOPS (that's AWS-speak for "we paid extra to get more disk 
bandwidth"), we didn't see any performance improvement!



More information about the Python-list mailing list