Re: speed concerns with executemany()

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: psycopg(at)postgresql(dot)org
Subject: Re: speed concerns with executemany()
Date: 2017-01-02 16:16:12
Message-ID: 20170102161612.ysuy6feg6ntzrd4g@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Mon, Jan 02, 2017 at 05:10:10PM +0100, Daniele Varrazzo wrote:

> > Any chance 'l' can be supported to be a generator expression ?
>
> The function would consume only page_size records at time. This is to
> avoid creating a humongous query in memory and then on the server, but
> has the nice effect of requesting only as many records from the
> sequence.

Nice.

Can said sequence be a generator (IOW not needing to support
len() upfront) ?

Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Daniele Varrazzo 2017-01-02 16:21:31 Re: Solving the SQL composition problem
Previous Message Adrian Klaver 2017-01-02 16:15:54 Re: speed concerns with executemany()