Re: Index-only scans vs. partially-retrievable indexes

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrey Borodin <x4mmm(at)yandex-team(dot)ru>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Index-only scans vs. partially-retrievable indexes
Date: 2022-01-03 14:57:14
Message-ID: 3544864.1641221834@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrey Borodin <x4mmm(at)yandex-team(dot)ru> writes:
> I've tried to toy with the patch and remembered one related caveat.
> If we have index for both returnable and nonreturnable attributes, IOS will not be choosen:

> postgres=# create index on t using gist(a gist_trgm_ops) include (a);
> postgres=# explain select * from t where a like 'z';
> QUERY PLAN
> ---------------------------------------------------------------------
> Index Scan using t_a_a1_idx on t (cost=0.12..8.14 rows=1 width=32)
> Index Cond: (a ~~ 'z'::text)
> (2 rows)

This case is improved by 0002, no?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2022-01-03 15:01:59 Re: Column Filtering in Logical Replication
Previous Message Nikhil Benesch 2022-01-03 14:53:52 Re: Remove inconsistent quotes from date_part error