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

Chris Angelico rosuav at gmail.com
Fri Mar 29 22:49:56 EDT 2013


On Sat, Mar 30, 2013 at 1:44 PM, Roy Smith <roy at panix.com> 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.

*facepalm*

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.

ChrisA



More information about the Python-list mailing list