Re: Identifying old/unused views and table

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Identifying old/unused views and table
Дата
Msg-id 1317192748.2364.2.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Identifying old/unused views and table  (Craig Ringer <ringerc@ringerc.id.au>)
Ответы Re: Identifying old/unused views and table
Список pgsql-general
On Wed, 2011-09-28 at 09:04 +0800, Craig Ringer wrote:
> On 09/28/2011 04:51 AM, Jason Long wrote:
> > I have an application with a couple hundred views and a couple hundred
> > tables.
> >
> > Is there some way I can find out which views have been accessed in the
> > last 6 months or so?  Or some way to log this?
> >
> > I know there are views and tables that are no longer in used by my
> > application and I am looking for a way to identify them.
>
> Look at the pg_catalog.pg_stat* tables
>

I fail to see how that gives him any answer on the views, and tables no
longer used. AFAICT, there's no way to know for views (apart from
logging all queries in the log). As for tables, still apart from the
log, pg_stat_user_tables could give an answer if he was monitoring it at
least the last six months.


--
Guillaume
  http://blog.guillaume.lelarge.info
  http://www.dalibo.com


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

Предыдущее
От: Johan De Meersman
Дата:
Сообщение: Re: Download States and Capitals Database
Следующее
От: Vincent Veyron
Дата:
Сообщение: Re: Quick-and-Dirty Data Entry with LibreOffice3?