Re: Weird behavior of INSERT QUERY

2023-06-05 Thread Satalabaha Postgres
On Mon, 5 Jun 2023 at 04:35, Ranier Vilela wrote: > Em dom., 4 de jun. de 2023 às 11:49, Satalabaha Postgres < > satalabaha.postg...@gmail.com> escreveu: > >> >> >> >> On Sun, 4 Jun 2023 at 19:46, Ranier Vilela wrote: >> >>> Em dom., 4 de jun. de 2023 às 05:35, Satalabaha Postgres < >>>

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Ranier Vilela
Em dom., 4 de jun. de 2023 às 11:49, Satalabaha Postgres < satalabaha.postg...@gmail.com> escreveu: > > > > On Sun, 4 Jun 2023 at 19:46, Ranier Vilela wrote: > >> Em dom., 4 de jun. de 2023 às 05:35, Satalabaha Postgres < >> satalabaha.postg...@gmail.com> escreveu: >> >>> Hi Listers, >>> >>> DB

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Satalabaha Postgres
Regards, Satalabha On Sun, 4 Jun 2023 at 18:56, Tom Lane wrote: > Satalabaha Postgres writes: > > The select query in the insert returns about 499 rows. However, this > insert > > statement when executed from application user i.e. schema1_u takes close > to > > 8 minutes. When the same

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Satalabaha Postgres
On Sun, 4 Jun 2023 at 19:46, Ranier Vilela wrote: > Em dom., 4 de jun. de 2023 às 05:35, Satalabaha Postgres < > satalabaha.postg...@gmail.com> escreveu: > >> Hi Listers, >> >> DB : postgres 14. >> >> We are experiencing weird performance issue of one simple insert >> statement taking several

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Ranier Vilela
Em dom., 4 de jun. de 2023 às 05:35, Satalabaha Postgres < satalabaha.postg...@gmail.com> escreveu: > Hi Listers, > > DB : postgres 14. > > We are experiencing weird performance issue of one simple insert statement > taking several minutes to insert data. The application calls insert > statement

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Tom Lane
Satalabaha Postgres writes: > The select query in the insert returns about 499 rows. However, this insert > statement when executed from application user i.e. schema1_u takes close to > 8 minutes. When the same insert statement gets executed as postgres user > it takes less than 280 ms. Both

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Julien Rouhaud
Please don't top post on this mailing list: https://wiki.postgresql.org/wiki/Mailing_Lists#Email_etiquette_mechanics On Sun, Jun 4, 2023 at 7:42 PM Satalabaha Postgres wrote: > > Yes both in both the cases the same tables are accessed. Yes we tried > indexing as well, but we have the same

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Satalabaha Postgres
Hi Julien, Yes both in both the cases the same tables are accessed. Yes we tried indexing as well, but we have the same behaviour. Regards, Satalabha On Sun, 4 Jun 2023 at 16:51, Julien Rouhaud wrote: > Hi, > > On Sun, Jun 04, 2023 at 02:04:52PM +0530, Satalabaha Postgres wrote: > > > > DB

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Julien Rouhaud
Hi, On Sun, Jun 04, 2023 at 02:04:52PM +0530, Satalabaha Postgres wrote: > > DB : postgres 14. > > We are experiencing weird performance issue of one simple insert statement > taking several minutes to insert data. The application calls insert > statement via stored procedure show mentioned

Re: Weird behavior of INSERT QUERY

2023-06-04 Thread Satalabaha Postgres
Forgot to mention. If I cancel the long running insert statement from schema1_u user query before completion, I see the below. Not sure if this will help but just thought to mention it. CONTEXT: SQL statement "SELECT 1 FROM ONLY "schema1"."table_b" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY

Weird behavior of INSERT QUERY

2023-06-04 Thread Satalabaha Postgres
Hi Listers, DB : postgres 14. We are experiencing weird performance issue of one simple insert statement taking several minutes to insert data. The application calls insert statement via stored procedure show mentioned below. The select query in the insert returns about 499 rows. However, this