Re: speed concerns with executemany()

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>, Aryeh Leib Taurog <python(at)aryehleib(dot)com>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: speed concerns with executemany()
Date: 2017-02-01 20:48:31
Message-ID: f5027958-d5f9-181b-8b4a-be081170fdc3@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On 1/31/17 6:21 PM, Daniele Varrazzo wrote:
> ISTM that it's easier to leave the users to call
> PREPARE/execute_batch('EXECUTE')/DEALLOCATE: knowing the context in
> which the sequence is called wouldn't require parameters mangling and
> the error management would be simpler for them.

I think a context handler for prepare would be very handy, so that you
didn't need to remember to dealloc. There might be a way to avoid the
separate prepare too.

I agree that trying to magically convert % to $ and back is nothing but
trouble. If users are using prepared statements, they need to understand
the $ syntax.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2017-02-02 03:12:35 Re: speed concerns with executemany()
Previous Message Aryeh Leib Taurog 2017-02-01 13:32:19 Re: speed concerns with executemany()