Re: Weird behavior of INSERT QUERY - Mailing list pgsql-performance

From Julien Rouhaud
Subject Re: Weird behavior of INSERT QUERY
Date
Msg-id CAOBaU_Z0Pgw-usCW0C90wPEOdgtc6VWOPnYVgpHco5N3LSSKew@mail.gmail.com
Whole thread Raw
In response to Re: Weird behavior of INSERT QUERY  (Satalabaha Postgres <satalabaha.postgres@gmail.com>)
List pgsql-performance
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
<satalabaha.postgres@gmail.com> wrote:
>
> Yes both in both the cases the same tables are accessed. Yes we tried indexing as well, but we have the same
behaviour.

Do you reproduce the problem if you connect and execute that query
manually with the schema1_u user?  Is the query always fast when
running as postgres and always slow when running as schema1_u?  Is
there any special configuration for that user? \drds can tell you
that, but those should get logged with the rest of the non default
parameters already displayed in the explain plan.

If you can reproduce easily, you should be able to get the execution
plans of the underlying FK queries using auto_explain and
auto_explain.log_nested_statements = true.  It might show you the
problem.



pgsql-performance by date:

Previous
From: Satalabaha Postgres
Date:
Subject: Re: Weird behavior of INSERT QUERY
Next
From: Tom Lane
Date:
Subject: Re: Weird behavior of INSERT QUERY