Re: Index-only scans vs. partially-retrievable indexes
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrey Borodin <x4mmm@yandex-team.ru>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-01-03T14:57:14Z
Lists: pgsql-hackers
Andrey Borodin <x4mmm@yandex-team.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
Commits
-
Handle mixed returnable and non-returnable columns better in IOS.
- 8a2e323f2085 15.0 landed
-
Fix index-only scan plans, take 2.
- ec367452179c 11.15 landed
- d228af79d0f2 14.2 landed
- 9c4f38908447 12.10 landed
- 9a3ddeb519e8 15.0 landed
- 7d344f00413a 10.20 landed
- 20d08b2c61cd 13.6 landed