R: [GENERAL] batch inserts in python libpq

2009-08-10 Thread Scara Maccai
Is there a Python driver that uses the same protocol form of addBatch in Java? I'll answer my own question: the method to be used should be cursor.executemany() -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] batch inserts in python libpq

2009-08-07 Thread Scara Maccai
Hi all, using Java I'm able to get a 1 inserts/sec on our server using batch updates (using preparedStatement.addBatch()). Using Python I can't get past 2000 inserts/sec, which is roughly the same performance of Java without addBatch. Is there a Python driver that uses the same protocol

Re: [GENERAL] batch inserts in python libpq

2009-08-07 Thread Sam Mason
On Fri, Aug 07, 2009 at 01:37:08PM +, Scara Maccai wrote: using Java I'm able to get a 1 inserts/sec on our server using batch updates (using preparedStatement.addBatch()). I'd probably generate SQL that looks somewhat like the following: UPDATE foo f SET v = x.v FROM (VALUES