13

I am curious about how the internal data structures and storage mechanism of the spatial GiST index in Postgis. In Oracle, I used to like to show how the SDO indexes were "just another table", and how the levels were attributes of the indexes, and the bboxes of the indexed geometries were stored as blobs (that could be extracted). HOw does postgis store the indexes, and where?

The system tables http://www.postgresql.org/docs/8.3/static/catalogs.html can be used to identify indexes, but I do not know how to access the actual storage ( if they are indeed tables)

asked Feb 12, 2016 at 3:33
5
  • I have found this: <sai.msu.su/~megera/postgres/gist/gevel/README.gevel>. Gevel should be able to visualize this, but I am unable to get this to run with postgis.app (mac osx) with PostGIS 2.0. Commented Feb 12, 2016 at 5:51
  • 1
    They're not "just another table" in PostgreSQL. They're index relations with a wholly different format. Commented Feb 12, 2016 at 6:46
  • I think gevel is what there is. So, perhaps, you should rephrase your question with the issues you have having installing gevel. Interesting question, for sure. Commented Feb 12, 2016 at 12:07
  • Thanks for the comments. Craig, I would upvote if you provided a response in the vain of what you have commented, but with more details or links to the relevant materials. I am interested in HOW this is stored. John, I will make a separate question re gavel. Still, a pointer to the documentation on how storage is achieved is what I am after. Commented Feb 16, 2016 at 3:16
  • I have added a question about gevel here: gis.stackexchange.com/questions/180887/… Commented Feb 16, 2016 at 3:23

1 Answer 1

2

As Craig mentions the spatial indexes are not just another table. Instead, PostGis uses GiST as the structural foundation for storing bbox details. Yes, this is (when using defaults) different and more efficient and less precise that B-Trees, or R-Trees....but you can specify parameters which make GiST indexes similar to spatial indexes from other storage.

Here is the documentation on how to work with them (including extending them.)

Dig in.

answered Aug 23, 2016 at 18:30

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.