Daniel Westermann wrote:
> >I'd say the old index tuple was killed during the first scan:
> >https://www.cybertec-postgresql.com/en/killed-index-tuples/
>
> ... from your blog: "Whenever an index scan fetches a heap tuple only to find that it is dead
> (that the entire “HOT chain” of tuples is dead, to be more precise), it marks the index tuple
> as “killed”. Then future index scans can simply ignore it.
>
> I understand that, but in my case the chain is not dead so this does not explain the difference.
> Do I miss something?
I assume that the UPDATE was not HOT, because the first scan had to fetch two tuples.
After the UPDATE, the original tuple was dead (the HOT chain consists
only of a single tuple here, because it was no HOT update).
The first index scan detects that and marks the index tuple as killed.
The second index scan only visits the new tuple.
Yours,
Laurenz Albe