RE: procedure using CURSOR to insert is extremely slow

2021-04-08 Thread Szalontai Zoltán
rom: Milos Babic mailto:milos.ba...@gmail.com> > Sent: Thursday, April 8, 2021 2:31 PM To: Szalontai Zoltán mailto:szalontai.zol...@t-online.hu> > Cc: Pgsql Performance mailto:pgsql-performance@lists.postgresql.org> > Subject: Re: procedure using CURSOR to insert is extremely slow Hi Z

Re: procedure using CURSOR to insert is extremely slow

2021-04-08 Thread Milos Babic
; *From:* Milos Babic > *Sent:* Thursday, April 8, 2021 2:31 PM > *To:* Szalontai Zoltán > *Cc:* Pgsql Performance > *Subject:* Re: procedure using CURSOR to insert is extremely slow > > > > Hi Zoltan, > > > > is there any particular reason why you don

RE: procedure using CURSOR to insert is extremely slow

2021-04-08 Thread Mike Sofen
solution. Mike From: Szalontai Zoltán Sent: Thursday, April 08, 2021 6:57 AM To: 'Milos Babic' Cc: 'Pgsql Performance' Subject: RE: procedure using CURSOR to insert is extremely slow Hi Milos, Inside the loops there are frequently if / else branches value t

RE: procedure using CURSOR to insert is extremely slow

2021-04-08 Thread Szalontai Zoltán
using CURSOR to insert is extremely slow Hi Zoltan, is there any particular reason why you don't do a bulk insert as: insert into target_table select ... from source_table(s) (with joins etc) Regards, Milos On Thu, Apr 8, 2021 at 1:24 PM Szalontai Z

Re: procedure using CURSOR to insert is extremely slow

2021-04-08 Thread Milos Babic
Hi Zoltan, is there any particular reason why you don't do a bulk insert as: insert into target_table select ... from source_table(s) (with joins etc) Regards, Milos On Thu, Apr 8, 2021 at 1:24 PM Szalontai Zoltán < szalontai.zol...@t-online.hu> wrote: > Hi, > > > > We have a Class db.t

RE: procedure using CURSOR to insert is extremely slow

2021-04-08 Thread Szalontai Zoltán
How to check execution plans? We are in the Loop of the Cursor, and we do insert operations in it. From: Hervé Schweitzer (HER) Sent: Thursday, April 8, 2021 1:40 PM To: Szalontai Zoltán ; pgsql-performance@lists.postgresql.org Subject: Re: procedure using CURSOR to insert is extremely slow

Re: procedure using CURSOR to insert is extremely slow

2021-04-08 Thread HER
@lists.postgresql.org Subject: procedure using CURSOR to insert is extremely slow Hi, We have a Class db.t2.medium database on AWS. We use a procedure to transfer data records from the Source to the Target Schema. Transfers are identified by the log_id field in the target table. The

procedure using CURSOR to insert is extremely slow

2021-04-08 Thread Szalontai Zoltán
Hi, We have a Class db.t2.medium database on AWS. We use a procedure to transfer data records from the Source to the Target Schema. Transfers are identified by the log_id field in the target table. The procedure is: 1 all records are deleted from the Target table with the actual log_id v