RE: [EXTERNAL] Re: Inserts and bad performance

Поиск
Список
Период
Сортировка
От Godfrin, Philippe E
Тема RE: [EXTERNAL] Re: Inserts and bad performance
Дата
Msg-id SA0PR15MB3933644C28286B9BEC3B218C82619@SA0PR15MB3933.namprd15.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Inserts and bad performance  (Gavin Roy <gavinr@aweber.com>)
Ответы Re: [EXTERNAL] Re: Inserts and bad performance
Re: RE: [EXTERNAL] Re: Inserts and bad performance
Список pgsql-general

The notion of COPY blocks and asynchronously is very interesting

 

From: Gavin Roy <gavinr@aweber.com>
Sent: Wednesday, November 24, 2021 1:50 PM
To: Godfrin, Philippe E <Philippe.Godfrin@nov.com>
Cc: pgsql-general@lists.postgresql.org
Subject: [EXTERNAL] Re: Inserts and bad performance

 

 

 

 

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

 

 

And if using psycopg2, execute_batch might be of value:

 

 

Regards,

 

Gavin

 

 

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

Предыдущее
От: "Godfrin, Philippe E"
Дата:
Сообщение: RE: [EXTERNAL] Re: Inserts and bad performance
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: [EXTERNAL] Re: Inserts and bad performance