Search Postgresql Archives

Re: Monitoring object usage?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux