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

Chris Angelico rosuav at
Sat Mar 30 03:49:56 CET 2013

On Sat, Mar 30, 2013 at 1:44 PM, Roy Smith <roy at> wrote:
> The slow way (i.e. "VALUES"), I'm inserting 1000 rows about every 2.4
> seconds.  When I switch to "values", I'm getting more like 1000 rows in
> 100 ms!
> A truly breathtaking bug.


Doubly facepalm because a regex could easily have tested for mixed case.

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).

I agree. Breathtaking.


More information about the Python-list mailing list