How do you find the disk size of a Postgres / PostgreSQL table and its indexes

前端 未结 9 2139
甜味超标
甜味超标 2020-12-02 03:42

I\'m coming to Postgres from Oracle and looking for a way to find the table and index size in terms of bytes/MB/GB/etc, or even better the size for all tables.

9条回答
  •  再見小時候
    2020-12-02 04:14

    PostgreSQL tables have three components: the table itself, any indexes on it, and potentially TOAST data. There's a couple of examples showing how to slide and dice the available information various ways at http://wiki.postgresql.org/wiki/Disk_Usage

提交回复
热议问题