Re: [psycopg] speed concerns with executemany()

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема Re: [psycopg] speed concerns with executemany()
Дата
Msg-id CA+mi_8bdfAd5L4b7NURZ8uwsUwoVXwqh9qzbKKiPaiZdfo4FrA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [psycopg] speed concerns with executemany()  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Ответы Re: [psycopg] speed concerns with executemany()
Список psycopg
On Mon, Jan 2, 2017 at 4:46 PM, Karsten Hilbert <Karsten.Hilbert@gmx.net> wrote:
> On Mon, Jan 02, 2017 at 07:35:46AM -0800, Adrian Klaver wrote:
>
>>>> In [56]: %timeit -n 10 cur.executemany(sql, l)
>
> Someone along the way was asking for a possibility to "feed
> in" the 'l' values.
>
> 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.

-- Daniele


В списке psycopg по дате отправления:

Предыдущее
От: Daniele Varrazzo
Дата:
Сообщение: Re: [psycopg] speed concerns with executemany()
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: [psycopg] speed concerns with executemany()