From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Index only scan and ctid |
Date: | 2020-02-04 18:22:54 |
Message-ID: | 20574.1580840574@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
> On Mon, 2020-02-03 at 14:43 -0500, Tom Lane wrote:
>> Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> writes:
>>> I noticed that "ctid" in the select list prevents an index only scan:
>>> This strikes me as strange, since every index contains "ctid".
>> There's no provision for an IOS to return a system column, though.
>> Not sure what it'd take to make that possible.
> I was reminded what the obvious problem is:
> the ctid of a heap only tuple is not stored in the index. Duh.
Duh ... the members of a HOT chain share the same indexed value(s),
which is why we needn't care exactly which one is live during IOS.
But they don't have the same TID. Oh well.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Dmitry Dolgov | 2020-02-04 20:02:05 | Re: Index Skip Scan |
Previous Message | Laurenz Albe | 2020-02-04 18:11:59 | Re: Index only scan and ctid |