Re: Example code Re: Singleton SELECT inside cursor loop - Mailing list pgsql-general

From Christoph Moench-Tegeder
Subject Re: Example code Re: Singleton SELECT inside cursor loop
Date
Msg-id Yzia+95fuJ2INGLK@elch.exwg.net
Whole thread Raw
In response to Re: Example code Re: Singleton SELECT inside cursor loop  (Ron <ronljohnsonjr@gmail.com>)
Responses Re: Example code Re: Singleton SELECT inside cursor loop
List pgsql-general
## Ron (ronljohnsonjr@gmail.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



pgsql-general by date:

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