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)

  • 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.
    – MartinT
    Feb 12, 2016 at 5:51
  • 1
    They're not "just another table" in PostgreSQL. They're index relations with a wholly different format. 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. 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.
    – MartinT
    Feb 16, 2016 at 3:16
  • I have added a question about gevel here: gis.stackexchange.com/questions/180887/…
    – MartinT
    Feb 16, 2016 at 3:23

1 Answer 1


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.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.