Re: Trying to understand why a query is filtering when there is a composite index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Stephen Samuel (Sam)" <sam(at)sksamuel(dot)com>
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Trying to understand why a query is filtering when there is a composite index
Date: 2024-08-19 23:55:26
Message-ID: 1434438.1724111726@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Stephen Samuel (Sam)" <sam(at)sksamuel(dot)com> writes:
> This index covers both columns needed in the predicate/projection, and the
> visibility bit is almost always set, why does it need to go to the heap at
> all and doesn't just get what it needs from the index?

Peter's theory was that the particular tuples you were fetching were
in not-all-visible pages. That seems plausible to me.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Stephen Samuel (Sam) 2024-08-20 00:00:59 Re: Trying to understand why a query is filtering when there is a composite index
Previous Message Stephen Samuel (Sam) 2024-08-19 23:44:04 Re: Trying to understand why a query is filtering when there is a composite index