Re: simple query running long time within a long transaction.

From: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>
To: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: simple query running long time within a long transaction.
Date: 2023-11-17 09:17:18
Message-ID: e3320d41-1c26-b8f6-f7c1-f40768fc53e7@a-kretschmer.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Am 17.11.23 um 09:10 schrieb James Pang (chaolpan):
>
> Hi,
>
>    We found one simple query manually run very fast(finished in
> several milliseconds), but there are 2 sessions within long
> transaction to run same sql with same bind variables took tens of seconds.
>
you try to set plan_cache_mode to force_custom_plan, default is auto and
with that and bind variables pg will use a generic plan.

Regards, Andreas

--
Andreas Kretschmer - currently still (garden leave)
Technical Account Manager (TAM)
www.enterprisedb.com

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message James Pang (chaolpan) 2023-11-18 11:13:50 RE: simple query running long time within a long transaction.
Previous Message James Pang (chaolpan) 2023-11-17 08:10:45 simple query running long time within a long transaction.