From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com> |
Cc: | mike bayer <mike_mp(at)zzzcomputing(dot)com>, Christophe Pettus <xof(at)thebuild(dot)com>, "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org> |
Subject: | Re: speed concerns with executemany() |
Date: | 2017-01-02 15:35:46 |
Message-ID: | bb29821c-0063-b584-91f1-ea6f0218ef6f@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
On 01/02/2017 05:05 AM, Daniele Varrazzo wrote:
> On Sun, Jan 1, 2017 at 9:33 PM, Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> wrote:
>
>> Same code across network, client in Bellingham WA, server in Fremont CA:
>>
>> Without autocommit:
>>
>> In [51]: %timeit -n 10 cur.executemany(sql, l)
>> 10 loops, best of 3: 8.22 s per loop
>>
>>
>> With autocommit:
>>
>> In [56]: %timeit -n 10 cur.executemany(sql, l)
>> 10 loops, best of 3: 8.38 s per loop
>
> Adrian, have you got a benchmark "classic vs. joined" on remote
> network? Thank you.
With NRECS=10000 and page size=100:
aklaver(at)tito:~> python psycopg_executemany.py -p 100
classic: 427.618795156 sec
joined: 7.55754685402 sec
>
> -- Daniele
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Karsten Hilbert | 2017-01-02 15:46:14 | Re: speed concerns with executemany() |
Previous Message | Adrian Klaver | 2017-01-02 15:21:39 | Re: speed concerns with executemany() |