Re: Any way to speed up INSERT INTO

2022-03-04 Thread aditya desai
Thanks all for your inputs. We will try to implement inserts in single transaction. I feel that is the best approach. Thanks, AD. On Saturday, March 5, 2022, Bruce Momjian wrote: > On Fri, Mar 4, 2022 at 01:42:39PM -0500, Tom Lane wrote: > > aditya desai writes: > > > One of the service

Re: XA transactions much slower on 14.2 than on 13.5

2022-03-04 Thread Tom Lane
Mladen Gogala writes: > My boss asked me to upgrade one of the development  databases from 13.5 > --> 14.2. One thing that we've noticed right away is that XA > transactions (2-phase commit) are much slower on 14.2 than on 13.5. Were > there any significant changes to the XA protocol in the

XA transactions much slower on 14.2 than on 13.5

2022-03-04 Thread Mladen Gogala
My boss asked me to upgrade one of the development  databases from 13.5 --> 14.2. One thing that we've noticed right away is that XA transactions (2-phase commit) are much slower on 14.2 than on 13.5. Were there any significant changes to the XA protocol in the version 14? Did anybody else

Re: Any way to speed up INSERT INTO

2022-03-04 Thread Imre Samu
> Correct rows are wider. One of the columns is text and one is bytea. with the PG14 the LZ4 compression is worth checking. via https://www.postgresql.fastware.com/blog/what-is-the-new-lz4-toast-compression-in-postgresql-14 *"""INSERT statements with 16 clientsAnother common scenario that I

RES: Any way to speed up INSERT INTO

2022-03-04 Thread Edson Richter
De: Andres Freund Enviado:sexta-feira, 4 de março de 2022 15:52 Para: pgsql-performance@lists.postgresql.org; Tom Lane; aditya desai Cc:Pgsql

Re: Any way to speed up INSERT INTO

2022-03-04 Thread Andres Freund
Hi, On March 4, 2022 10:42:39 AM PST, Tom Lane wrote: >aditya desai writes: >> 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

Re: Any way to speed up INSERT INTO

2022-03-04 Thread Bruce Momjian
On Fri, Mar 4, 2022 at 01:42:39PM -0500, Tom Lane wrote: > aditya desai writes: > > 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

Re: Any way to speed up INSERT INTO

2022-03-04 Thread aditya desai
Hi Bruce, Correct rows are wider. One of the columns is text and one is bytea. Regards, Aditya. On Sat, Mar 5, 2022 at 12:08 AM Bruce Momjian wrote: > 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

Re: Any way to speed up INSERT INTO

2022-03-04 Thread Tom Lane
aditya desai writes: > 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

Re: Any way to speed up INSERT INTO

2022-03-04 Thread Bruce Momjian
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

Any way to speed up INSERT INTO

2022-03-04 Thread aditya desai
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