Search Postgresql Archives

RE: [EXTERNAL] Re: Inserts and bad performance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The notion of COPY blocks and asynchronously is very interesting

 

From: Gavin Roy <gavinr@xxxxxxxxxx>
Sent: Wednesday, November 24, 2021 1:50 PM
To: Godfrin, Philippe E <Philippe.Godfrin@xxxxxxx>
Cc: pgsql-general@xxxxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] Re: Inserts and bad performance

 

 

 

 

On Wed, Nov 24, 2021 at 2:15 PM Godfrin, Philippe E <Philippe.Godfrin@xxxxxxx> 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:

 

 

And if using psycopg2, execute_batch might be of value:

 

 

Regards,

 

Gavin

 

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux