How can I use gist in Postgres to fast query a two dimensional geographic data in double precision? For example, I have a table Points, which has three fields: point_id, X and Y and I want to use Postgres to quickly query point for which a < x < b and c < y < d. A detailed answer would be appreciated.
Asked
Active
Viewed 797 times
-2
-
`CREATE INDEX name ON table USING rtree (column);` where `column` corresponds to your `Point` column. – jimmu Mar 04 '18 at 04:45
-
This is not supported by new version any more – Moke Mao Mar 04 '18 at 06:10
-
1Why do you think an rtree index would be better? What is the problem with the current query you have? – Mar 04 '18 at 07:08
-
1People here might be able to much better help you when you post your table and index definitions, the query you are performing and the explain analyze output for that query. – Eelke Mar 04 '18 at 09:10
1 Answers
0
It is already implemented in PostgreSQL. You do not need to implement it, just create an appropriate index (look at GiST).

Has QUIT--Anony-Mousse
- 76,138
- 12
- 138
- 194