Re: A serious change in performance between PG 15 and PG 16, 17, 18.

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Clive Boughton <clive(dot)boughton(at)softimp(dot)com(dot)au>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: A serious change in performance between PG 15 and PG 16, 17, 18.
Date: 2026-02-16 04:04:07
Message-ID: CAApHDvrFhD9Ezi3qE60H77NV6qoQ4gkH7_+2GnbhnHy5EKQFWA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, 16 Feb 2026 at 16:49, Clive Boughton
<clive(dot)boughton(at)softimp(dot)com(dot)au> 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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message David G. Johnston 2026-02-16 04:04:35 Re: A serious change in performance between PG 15 and PG 16, 17, 18.
Previous Message Tom Lane 2026-02-16 04:03:42 Re: A serious change in performance between PG 15 and PG 16, 17, 18.