From: | PG Doc comments form <noreply(at)postgresql(dot)org> |
---|---|
To: | pgsql-docs(at)lists(dot)postgresql(dot)org |
Cc: | michael(dot)dietrich(at)swisscom(dot)com |
Subject: | PostgreSQL 9.5.14 Documentation /Chapter 28 / 28.1. Determining Disk Usage |
Date: | 2018-09-05 11:43:55 |
Message-ID: | 153614783570.23141.4323003313980257657@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
The following documentation comment has been logged on the website:
Page: https://www.postgresql.org/docs/9.5/static/disk-usage.html
Description:
PostgreSQL 9.5.14 Documentation / Chapter 28. Monitoring Disk Usage / 28.1.
Determining Disk Usage
(Applies for other Versions, too.)
I'm wondering if the two statements given showing the index space size as
described.
I've the impression they show the space size of the tables.
Regards --Michael
Extract of the manual:
You can easily display index sizes, too:
SELECT c2.relname, c2.relpages
FROM pg_class c, pg_class c2, pg_index i
WHERE c.relname = 'customer' AND
c.oid = i.indrelid AND
c2.oid = i.indexrelid
ORDER BY c2.relname;
relname | relpages
----------------------+----------
customer_id_indexdex | 26
It is easy to find your largest tables and indexes using this information:
SELECT relname, relpages
FROM pg_class
ORDER BY relpages DESC;
relname | relpages
----------------------+----------
bigtable | 3290
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2018-09-05 21:39:11 | Re: PostgreSQL 9.5.14 Documentation /Chapter 28 / 28.1. Determining Disk Usage |
Previous Message | Bruce Momjian | 2018-09-05 02:35:35 | Re: AT TIME ZONE correction |