SV: Insertion time is very high for inserting data in postgres

Поиск
Список
Период
Сортировка
От Niels Jespersen
Тема SV: Insertion time is very high for inserting data in postgres
Дата
Msg-id 280e6bd026024e389657ae15ba169e90@dst.dk
обсуждение исходный текст
Ответ на Insertion time is very high for inserting data in postgres  (prachi surangalikar <surangalikarprachi100@gmail.com>)
Ответы Re: Insertion time is very high for inserting data in postgres  (Dave Cramer <davecramer@postgres.rocks>)
Re: SV: Insertion time is very high for inserting data in postgres  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general

>Fra: prachi surangalikar <surangalikarprachi100@gmail.com>

>Hello Team,

>Greetings!

>We are using Postgres 12.2.1 for fetching per minute data for about 25 machines but running parallely via a single thread in python.

>But suddenly the insertion time has increased to a very high level, about 30 second for one machine.

>We are in so much problem as the data fetching is becoming slow.

>if anyone could help us to solve this problem it would be of great help to us.

 

Get your data into a Text.IO memory structure and then use copy https://www.psycopg.org/docs/usage.html#using-copy-to-and-copy-from

 

This is THE way of high-performant inserts using Postgres.

 

Regards Niels Jespersen

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

Предыдущее
От: cen
Дата:
Сообщение: Re: Regarding Postgres - Insertion Time Getting Increased As Data Volume is getting increased
Следующее
От: Thorsten Schöning
Дата:
Сообщение: Re: Increased size of database dump even though LESS consumed storage