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

2023-11-18 Thread Frits Hoogland
ame sql plan. > > -Original Message- > From: Andreas Kretschmer > Sent: Friday, November 17, 2023 5:17 PM > To: pgsql-performance@lists.postgresql.org > Subject: Re: simple query running long time within a long transaction. > > > > Am 17.11.23 um 09:10 schrieb James Pang

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

2023-11-18 Thread James Pang (chaolpan)
Looks like it's not sql issue, manually running still use prepared statements and use same sql plan. -Original Message- From: Andreas Kretschmer Sent: Friday, November 17, 2023 5:17 PM To: pgsql-performance@lists.postgresql.org Subject: Re: simple query running long time within a long

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

2023-11-17 Thread Andreas Kretschmer
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

simple query running long time within a long transaction.

2023-11-17 Thread 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. Manually run this sql only show <100 shared_blks_hit and very small reads, but for these 2