Search code examples
postgresqlindexingb-tree

Btree details on Postgresql


How can i know details about an index on postgresql like how many nodes, and tree height?

It is possible to access the data structure itself?

i havent found any catalog tables that exposes such that detailed information

Thanks in advance!


Solution

  • See the bt_metap function in the pageinspect extension.

    http://www.postgresql.org/docs/current/static/pageinspect.html