Verifier la taille des bases:

SELECT pg_database.datname, pg_size_pretty(pg_database_size(pg_database.datname)) AS size FROM pg_database;

Verifier la taille de la base VCDB:

SELECT pg_size_pretty(pg_database_size('VCDB'));

Trouver les plus grosses tables:

SELECT relname AS "relation", pg_size_pretty(pg_relation_size(C.oid)) AS "size" FROM pg_class C LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)WHERE nspname NOT IN ('pg_catalog', 'information_schema') ORDER BY pg_relation_size(C.oid) DESC LIMIT 15;

Lister les bases de donnée:

\list

ou

\l

Lister toutes les tables:

\dt *.

Lister toutes les table d'un schema.

\dt vumdbc.
\dt vc.

Comments est propulsé par CComment