Any way to speed up INSERT INTO

From: aditya desai <admad123(at)gmail(dot)com>
To: Pgsql Performance <pgsql-performance(at)lists(dot)postgresql(dot)org>
Subject: Any way to speed up INSERT INTO
Date: 2022-03-04 18:31:52
Message-ID: CAN0SRDHkd=3j7_xu2G_mg0ku0uwdN+DDGxEn8gzO=9hb=UFtcw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Hi,
One of the service layer app is inserting Millions of records in a table
but one row at a time. Although COPY is the fastest way to import a file in
a table. Application has a requirement of processing a row and inserting it
into a table. Is there any way this INSERT can be tuned by increasing
parameters? It is taking almost 10 hours for just 2.2 million rows in a
table. Table does not have any indexes or triggers.

Regards,
Aditya.

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2022-03-04 18:38:51 Re: Any way to speed up INSERT INTO
Previous Message Tom Lane 2022-03-03 18:43:32 Re: OOM killer while pg_restore