From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Singleton SELECT inside cursor loop
Date: Sat, 1 Oct 2022 01:29:46 -0500
Message-ID: <ee9f6dc7-281d-f2a1-2556-54d36fd96e91@gmail.com> (raw)
AWS RDS Postgresql 12.11
It runs quickly, no matter what the fetched cursor values are, as long as
the cursor returns less than 8 rows. After that, the singleton SELECT's
performance tanks.
We've got plenty of other procedures which have a similar "Singleton SELECT
inside a cursor" design (many even query the same table that the problematic
query does), but only this procedure's singleton SELECT tanks if the cursor
returns more than 8 rows.
It only runs once a month, so we've only just noticed the problem.
Why would that be? (We recently updated from 12.10 to 12.11, if that's
relevant.)
--
Angular momentum makes the world go 'round.
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: ronljohnsonjr@gmail.com
Subject: Re: Singleton SELECT inside cursor loop
In-Reply-To: <ee9f6dc7-281d-f2a1-2556-54d36fd96e91@gmail.com>
References: <ee9f6dc7-281d-f2a1-2556-54d36fd96e91@gmail.com>
* 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