Re: when was pg_stat_reset() used in my server for the last time

From: Marti Raudsepp <marti(at)juffo(dot)org>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: when was pg_stat_reset() used in my server for the last time
Date: 2011-12-14 20:56:31
Message-ID: CABRT9RCSToTJyQDfE1Eo-0k3BMz5CF5jQrodYs1sTew3y8eErQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 14, 2011 at 08:38, AI Rumman <rummandba(at)gmail(dot)com> wrote:
> Is it possible to find out, when was pg_stat_reset() used in my server for
> the last time?
> I am using Postgresql 9.2 and I need to find out unused index.

I assume you mean PostgreSQL 9.1.2

The pg_stat_database system view has a 'stats_reset' column, for each database.

There's also the pg_stat_get_db_stat_reset_time() function.

Regards,
Marti

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Angelico 2011-12-14 21:21:04 Re: Philosophical question
Previous Message Jay Levitt 2011-12-14 20:23:29 Re: Controlling complexity in queries