15 Jan

PostgreSQL – How to get the total index size used by each table in a database

PostgreSQL - How to get the total index size used by each table in a database

As per the documentation, To get the total size of all indexes attached to a table, you use the function. The pg_indexes_size() function accepts the OID or table name as the argument and returns the total disk space used by all indexes attached to that table.

We will use this funcion to get the index sizes of each table in the database.

Last updated by .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.