Re: [psycopg] speed concerns with executemany() - Mailing list psycopg

From Karsten Hilbert
Subject Re: [psycopg] speed concerns with executemany()
Date
Msg-id 20170102161612.ysuy6feg6ntzrd4g@hermes.hilbert.loc
Whole thread Raw
In response to Re: [psycopg] speed concerns with executemany()  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
List 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


psycopg by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: [psycopg] speed concerns with executemany()
Next
From: Daniele Varrazzo
Date:
Subject: Re: [psycopg] Solving the SQL composition problem