Re: Trying to understand why a query is filtering when there is a composite index - Mailing list pgsql-performance

From Stephen Samuel (Sam)
Subject Re: Trying to understand why a query is filtering when there is a composite index
Date
Msg-id CANRyZ7Yn2-LZ4Rx8B1RdAqX9DdQhCgVVhx_-HB9i5xg5V26QQg@mail.gmail.com
Whole thread Raw
In response to Re: Trying to understand why a query is filtering when there is a composite index  (Peter Geoghegan <pg@bowt.ie>)
Responses Re: Trying to understand why a query is filtering when there is a composite index
List pgsql-performance
Oh as simple as upgrading!
Ok great, appreciate the quick reply. Will have to wait for AWS to support 17 :)


On Sun, 18 Aug 2024 at 20:59, Peter Geoghegan <pg@bowt.ie> wrote:
On Sun, Aug 18, 2024 at 9:56 PM Stephen Samuel (Sam) <sam@sksamuel.com> wrote:
> My question is, why isn't it using the index for column b? Is this expected? And why is it doing heap lookups for every row,.

This has been fixed for Postgres 17:

https://pganalyze.com/blog/5mins-postgres-17-faster-btree-index-scans

--
Peter Geoghegan

pgsql-performance by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Trying to understand why a query is filtering when there is a composite index
Next
From: Peter Geoghegan
Date:
Subject: Re: Trying to understand why a query is filtering when there is a composite index