ctid ranges - Mailing list pgsql-general

From Thomas Munro
Subject ctid ranges
Date
Msg-id CADLWmXX1Ov8xp02DDjvZveM=h8OJCaH-HyoUUY0UF-CVVk2=vA@mail.gmail.com
Whole thread Raw
Responses Re: ctid ranges
List pgsql-general
Hi

In 9.1.3, this is fast, handled with a tid scan using the physical address:

SELECT ... FROM ... WHERE ctid = ...;

This is slow, handled with a seq scan (as are various rephrasing with
<, <=, etc):

SELECT ... FROM ... WHERE ctid BETWEEN ... AND ...;

Is there a way to retrieve the rows in a physical range quickly?

(I realise this is a pretty odd thing to want to do... I was
experimenting with a crackpot idea for storing some data in a known
physical order and finding the beginning of ends ranges by binary
chop, instead of using a btree.)

Thanks
Thomas Munro

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: New crosslinks in docs
Next
From: Tom Lane
Date:
Subject: Re: Extension table data