| From: | Ali (dot) <mp(dot)x(at)bk(dot)ru> |
|---|---|
| To: | "Godfrin, Philippe E" <philippe(dot)godfrin(at)nov(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org <pgsql-general(at)lists(dot)postgresql(dot)org>, Gavin Roy <gavinr(at)aweber(dot)com> |
| Subject: | Re: RE: [EXTERNAL] Re: Inserts and bad performance |
| Date: | 2021-11-30 06:01:20 |
| Message-ID: | 1638252080.149803539@f520.i.mail.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Ok, thanks
--
Sent from Mail.ru app for Android Wednesday, 24 November 2021, 11:28pm +03:00 from Godfrin, Philippe E philippe(dot)godfrin(at)nov(dot)com :
>The notion of COPY blocks and asynchronously is very interesting
>
>From: Gavin Roy < gavinr(at)aweber(dot)com>
>Sent: Wednesday, November 24, 2021 1:50 PM
>To: Godfrin, Philippe E < Philippe(dot)Godfrin(at)nov(dot)com>
>Cc: pgsql-general(at)lists(dot)postgresql(dot)org
>Subject: [EXTERNAL] Re: Inserts and bad performance
>
>
>
>
>On Wed, Nov 24, 2021 at 2:15 PM Godfrin, Philippe E < Philippe(dot)Godfrin(at)nov(dot)com> wrote:
>>Greetings
>>I am inserting a large number of rows, 5,10, 15 million. The python code commits every 5000 inserts. The table has partitioned children.
>
>On the Python client side, if you're using psycopg, you should consider using using COPY instead of INSERT if you're not:
>
>https://www.psycopg.org/psycopg3/docs/basic/copy.html#copy
>
>And if using psycopg2, execute_batch might be of value:
>
>https://www.psycopg.org/docs/extras.html?highlight=insert#psycopg2.extras.execute_batch
>
>Regards,
>
>Gavin
>
>
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Saurav Sarkar | 2021-11-30 06:13:43 | Database Scalability |
| Previous Message | Michael Paquier | 2021-11-30 01:14:55 | Re: split postgresql logfile |