Re: Monitoring object usage?

Поиск
Список
Период
Сортировка
От tv@fuzzy.cz
Тема Re: Monitoring object usage?
Дата
Msg-id 293b8572768b1910ae297d70497adb0f.squirrel@sq.gransy.com
обсуждение исходный текст
Ответ на Monitoring object usage?  ("Colin 't Hart" <colinthart@gmail.com>)
Список pgsql-general
Well, you can see usage statistics for tables, indexes, functions and
sequences ... but AFAIK it's not possible to do that for columns.

See this
http://www.postgresql.org/docs/8.4/static/runtime-config-statistics.html
and then use pg_stat_ and pg_statio_ catalogs
(http://www.postgresql.org/docs/8.4/static/monitoring-stats.html) to find
objects that were not accessed recently (numbers are 0 or do not change
anymore, etc.).

But be careful as this may backfire quite easily - imagine an index that's
used only in a batch processing the end of month. You could easily decide
it's not necessary and drop it, causing a disaster.

Tomas

> Hi,
>
> I'm trying to get a grip on a new body of code and a Postgres database
> that
> I'm working with. In particular I've been tasked with cleaning up the
> database.
>
> Is there a way in Postgres to enable monitoring on tables and columns to
> determine what's not actively being used?
>
> This would then form input for a more thorough check into the code base to
> see what's really not being used.
>
>
> Thanks & cheers,
>
> Colin
>



В списке pgsql-general по дате отправления:

Предыдущее
От: Jayadevan M
Дата:
Сообщение: Re: Monitoring object usage?
Следующее
От: Peter Hopfgartner
Дата:
Сообщение: Getting FATAL: terminating connection due to administrator command