GIST index : order Hack : getting the order used by CLUSTER .. USING my_index

From: Rémi Cura <remi(dot)cura(at)gmail(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: GIST index : order Hack : getting the order used by CLUSTER .. USING my_index
Date: 2013-10-24 12:04:56
Message-ID: CAJvUf_tMkackbLCAKevoswhrCymxt=sm7_WOGqt3Bcaj8UhdRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey List,

I would like to be able to get the rows following the order of an index
(*NOT* getting an order by accelerated, but only an order defined by an
index).

Something like this :

SELECT my_row
FROM my_table
ORDER BY the_index ASC

where the_index is a GIST index over points.

I know there is a possibility as it is exactly what the command
CLUSTER my_table USING the_index
does.

I read the following page :
http://www.postgresql.org/docs/9.3/static/indexes-ordering.html, but it is
not of great help.
How much of a hack is it?

Cheers,

Rémi-C

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Amit Langote 2013-10-24 12:07:36 Re: GIN fast update technique and work_mem
Previous Message Andres Freund 2013-10-24 10:26:01 Re: GIN fast update technique and work_mem