Skip to main content
View rawEdit

How to get sizes of PostgreSQL databases, tables, and indexes with psql commands

Joe supports a number of psql meta-commands (backslash commands, such as \d). You can use these commands to get the size of database objects such as tables and indexes.

You can use meta-commands to get the size:

  • \dt+ – list tables;
  • \l+ - list databases;
  • \di+ – list indexes;
  • \dv+ – list views;
  • \dm+ – list materialized views;
  • other supported psql meta-commands are listed here.

Get object size / Web UI