Re: Weird behavior of INSERT QUERY

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: Satalabaha Postgres <satalabaha(dot)postgres(at)gmail(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Weird behavior of INSERT QUERY
Date: 2023-06-04 13:21:37
Message-ID: CAOBaU_Z0Pgw-usCW0C90wPEOdgtc6VWOPnYVgpHco5N3LSSKew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)postgres(at)gmail(dot)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.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Tom Lane 2023-06-04 13:26:44 Re: Weird behavior of INSERT QUERY
Previous Message Satalabaha Postgres 2023-06-04 11:42:27 Re: Weird behavior of INSERT QUERY