How to predict the size of a PostgreSQL index

Is it possible to predict the amount of disk space / memory that will be used by the base index in PostgreSQL 9.0?

eg. If I have a default B-tree index for an integer column in a 1 million row table, how much space will the index take? Is the entire index always stored in memory?

+3
source share
2 answers

This cannot be said. It depends on the type of operations you will do, since PostgreSQL stores many different versions of the same row, including the versions of the rows stored in the index files.

Just make the table you are interested in and check it.

+1
source

, 9.0, int 280 . . 6232kb. 22 .

+4

Source: https://habr.com/ru/post/1789347/


All Articles