pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christoph Moench-Tegeder <cmt@burggraben.net>
To: pgsql-general@lists.postgresql.org
Subject: Re: Example code Re: Singleton SELECT inside cursor loop
Date: Sat, 1 Oct 2022 21:54:35 +0200
Message-ID: <Yzia+95fuJ2INGLK@elch.exwg.net> (raw)
In-Reply-To: <d652ade6-183f-2fa2-bd00-f92cdb63169d@gmail.com>
References: <ee9f6dc7-281d-f2a1-2556-54d36fd96e91@gmail.com>
	<d0f2c884-db0f-826f-a4e2-24a5e31130d8@gmail.com>
	<Yzgwu2MHvqlfkdwH@elch.exwg.net>
	<d652ade6-183f-2fa2-bd00-f92cdb63169d@gmail.com>

## 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





view thread (8+ messages)  latest in thread

Message-ID: <Yzia+95fuJ2INGLK@elch.exwg.net>
Permalink:  ../Yzia+95fuJ2INGLK@elch.exwg.net/
Also on:    postgresql.org/message-id/Yzia+95fuJ2INGLK@elch.exwg.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: cmt@burggraben.net
  Subject: Re: Example code Re: Singleton SELECT inside cursor loop
  In-Reply-To: <Yzia+95fuJ2INGLK@elch.exwg.net>
  References: <ee9f6dc7-281d-f2a1-2556-54d36fd96e91@gmail.com> <d0f2c884-db0f-826f-a4e2-24a5e31130d8@gmail.com> <Yzgwu2MHvqlfkdwH@elch.exwg.net> <d652ade6-183f-2fa2-bd00-f92cdb63169d@gmail.com> <Yzia+95fuJ2INGLK@elch.exwg.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox