Re: Any way to speed up INSERT INTO - Mailing list pgsql-performance

From Bruce Momjian
Subject Re: Any way to speed up INSERT INTO
Date
Msg-id YiJcu8xuAHvJywzB@momjian.us
Whole thread Raw
In response to Any way to speed up INSERT INTO  (aditya desai <admad123@gmail.com>)
Responses Re: Any way to speed up INSERT INTO  (aditya desai <admad123@gmail.com>)
List pgsql-performance
On Sat, Mar  5, 2022 at 12:01:52AM +0530, aditya desai wrote:
> 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.

Well, sections 14.4 and 14.5 might help:

    https://www.postgresql.org/docs/14/performance-tips.html

Your time seems very slow --- are the rows very wide?

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  If only the physical world exists, free will is an illusion.




pgsql-performance by date:

Previous
From: aditya desai
Date:
Subject: Any way to speed up INSERT INTO
Next
From: Tom Lane
Date:
Subject: Re: Any way to speed up INSERT INTO