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

Roy Smith roy at
Sat Mar 30 04:40:36 CET 2013

In article 
<a6438dda-cc5f-4898-98c8-a0e0d754418f at>,
 rusi <rustompmody at> wrote:

> I recently heard this:
> A phone company needed to send out bulk-smses to its customers. It was
> of the order of millions.
> A (noob?) python programmer was assigned the task and used django with
> whatever is the django orm.
> It took of the order of weeks to send out the smses.
> A python expert was called in.  He threw out the python and redid it
> in SQL.
> It was done in minutes.

I'm not surprised.  It almost certainly wasn't the python that was the 
problem.  More than likely, he was doing some horribly inefficient 
database operations.

Certainly, in our case, performance is all about the database.  We 
mostly can't even measure the time we spend running Python code.

More information about the Python-list mailing list