25 septembre 2010

Identify large tables on Postgres

To quickly know which of your Postgres tables are the largest:

select relname, reltuples from pg_class order by reltuples desc;

reltuples are the number of rows, so this command will show your largest tables first.

Aucun commentaire:

Enregistrer un commentaire