Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I assume this completes this TODO:
> * Order duplicate index entries by tid for faster heap lookups
I don't know why that TODO entry exists, but I think the idea is
counterproductive. The existing btree code will tend to put newer
versions of a row earlier (because it puts a new entry in front of any
with duplicate keys), which usually reduces the time spent skipping dead
rows. Forcing tid ordering will cost us more in dead-row skipping than
it's likely to save elsewhere.
regards, tom lane