Re: Example code Re: Singleton SELECT inside cursor loop

From: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Example code Re: Singleton SELECT inside cursor loop
Date: 2022-10-01 19:54:35
Message-ID: Yzia+95fuJ2INGLK@elch.exwg.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

## Ron (ronljohnsonjr(at)gmail(dot)com):

> The question then is "why am I just now seeing the problem?"  We've been
> using v12 for two years, and it just happened.
>
> The only recent change is that I upgraded it from RDS 12.10 to 12.11 a
> couple of weeks ago.

That's correlation, but no proof for causality.
Now that you've confirmed that you have indeed a mismatch between generic
and custom plan, you could compare those (EXPLAIN EXECUTE) and see
where the generic plan goes wrong. Otherwise, prime suspects are bad
statistics (Were stats accurate before the update? How about now?
Ran VACUUM ANALYZE recently? If not, does it improve matters?)
If would help if you could compare execution plans with plans from
before the update, but I guess you didn't document those?

Regards,
Christoph

--
Spare Space

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2022-10-01 20:42:35 Re: Example code Re: Singleton SELECT inside cursor loop
Previous Message Tom Lane 2022-10-01 19:19:40 Re: Names of run-time configuration parameters (was: Limiting the operations that client-side code can perform upon its database backend's artifacts)