public inbox for [email protected]  
help / color / mirror / Atom feed
From: Simon Windsor <[email protected]>
To: [email protected]
Subject: Slow timestamp query after upgrading from Pg13 to Pg16
Date: Mon, 7 Apr 2025 15:48:48 +0100
Message-ID: <[email protected]> (raw)

Hello

After upgrading a Db from Pg13 (Centos) to Pg16(Ubuntu) some queries on 
a simple, large table (200M rows) are very slow

id integer not null
status char(4) not null
status_tstamp timestamp
<... other columns ...>

If I create indexes on

  * status, status_tstamp
  * status_tstamp when status_timestamp is not null

Queries for a set date range for a given status are good and perform 
similarly to Pg13

Queries for a set date range are VERY slow compared to Pg13. A few other 
queries on tables with indexes like

CREATE INDEX table_col ON table (col) WHERE col IS NOT NULL;

also appear to be slow.

Any ideas, observations or comments would be appreciated

Simon

-- 
Simon Windsor

Eml:[email protected]
Mob: 0755 197 9733


“There is nothing in the world that some man cannot make a little worse and sell a little cheaper, and he who considers price only is that man's lawful prey.”


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]
  Subject: Re: Slow timestamp query after upgrading from Pg13 to Pg16
  In-Reply-To: <[email protected]>

* 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