Slow timestamp query after upgrading from Pg13 to Pg16 - Mailing list pgsql-general

From Simon Windsor
Subject Slow timestamp query after upgrading from Pg13 to Pg16
Date
Msg-id 27b2975b-c078-45cf-815d-eddbedbda153@cornfield.me.uk
Whole thread Raw
Responses Re: Slow timestamp query after upgrading from Pg13 to Pg16
List pgsql-general

Hello

After upgrading a Db from Pg13 (Centos) to Pg16(Ubuntu) some queries on a simple, large table (200M rows) are very slowid 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: simon.windsor@cornfield.me.uk
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.”

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Custom index access method for primary keys
Next
From: Laurenz Albe
Date:
Subject: Re: Slow timestamp query after upgrading from Pg13 to Pg16