public inbox for [email protected]  
help / color / mirror / Atom feed
From: David Rowley <[email protected]>
To: Clive Boughton <[email protected]>
Cc: [email protected]
Subject: Re: A serious change in performance between PG 15 and PG 16, 17, 18.
Date: Mon, 16 Feb 2026 17:04:07 +1300
Message-ID: <CAApHDvrFhD9Ezi3qE60H77NV6qoQ4gkH7_+2GnbhnHy5EKQFWA@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On Mon, 16 Feb 2026 at 16:49, Clive Boughton
<[email protected]> wrote:
> When I recently upgraded to PG 18.1 (without any changes to the DB functions or tables, or indexing) it took 7-10 hours to produce the same result - a 300-600 times decrease in performance.

> For reasons of security I can't provide all the SQL code, but I can (if it is necessary) provide an outline of what the code does.

It will be necessary to provide more than you have done so far.
There's just no way anyone could guess what might be happening based
on what you've provided.

I suggest looking at the EXPLAIN output and seeing if there's a plan
change between the versions. Perhaps the newer version is considering
a plan shape that previously wasn't considered, and that turns out not
to be great due to some estimation problem. I suspect if you're seeing
300-600x slowdown, then it's pretty unlikely to be the same plan.

It'd be good if you could share the EXPLAIN (ANALYZE, BUFFERS) from
before and after the upgrade.

Perhaps the issue is just that you didn't run ANALYZE after a pg_upgrade.

David





view thread (8+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: A serious change in performance between PG 15 and PG 16, 17, 18.
  In-Reply-To: <CAApHDvrFhD9Ezi3qE60H77NV6qoQ4gkH7_+2GnbhnHy5EKQFWA@mail.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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox