Re: all empty tables - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: all empty tables
Date
Msg-id 1258196084.14314.21.camel@vanquo.pezone.net
Whole thread Raw
In response to all empty tables  (Garry Saddington <garry@schoolteachers.co.uk>)
List pgsql-general
On lör, 2009-11-14 at 10:12 +0000, Garry Saddington wrote:
> How could I list all the tables in a database that do not contain any data?
> I have looked at reltuples but can't quite work out how to use it, any
> pointers would be much apreciated.

select * from pg_class where relkind = 'r' and reltuples = 0; ?

Of course reltuples is only a statistic, not an up to date value, but
the above should be a pretty helpful start to detect possibly useless
tables.


pgsql-general by date:

Previous
From: Dave Page
Date:
Subject: Re: [pgeu-general] pgday.eu
Next
From: Andreas Kretschmer
Date:
Subject: Re: all empty tables