Re: all empty tables

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: all empty tables
Дата
Msg-id 1258196084.14314.21.camel@vanquo.pezone.net
обсуждение исходный текст
Ответ на all empty tables  (Garry Saddington <garry@schoolteachers.co.uk>)
Список 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 по дате отправления:

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: [pgeu-general] pgday.eu
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: all empty tables