Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 8E950B5DBE3; Thu, 12 May 2011 15:23:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 39938-08; Thu, 12 May 2011 18:23:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vw0-f46.google.com (mail-vw0-f46.google.com [209.85.212.46]) by mail.postgresql.org (Postfix) with ESMTP id 7BD31B5D8B2; Thu, 12 May 2011 15:23:26 -0300 (ADT) Received: by vws1 with SMTP id 1so1312886vws.19 for ; Thu, 12 May 2011 11:23:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=PtA0H8+3D2QiEvbIOjQ1o8I3GM+YT2tIgpArpw0hv7g=; b=JPdunBtGV719kf9nBoWP4NaLH3QYkrFHhrKWFeVVLkfqgmiIyI+zL1W7a1SUumOIsG 0BshbRdSfyhLLvscNJvbqBoQDh/gANMuJN0l6MIv5aN++pxiH/TXQApTlpXtjCMk6EvU lrwNetC7VT+c63NGiznF53uI4PUrv9YYJZoko= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DF1p4grx9r5gJ3wfBrzcPeSL3QnC3DwmRYA5gn2SuA1Bhp8ytm6k4sNILMfc8pSUjA 6S6pXcn2CTJW/hkIvCUI+s8B9/YnakOfBZjkVIga4WrTEdykJ54DixCDgO42Al9xeaxj romGkDC9jfiCHapRmnEXGN3pt4enivflAITYo= MIME-Version: 1.0 Received: by 10.52.110.234 with SMTP id id10mr715775vdb.303.1305224573096; Thu, 12 May 2011 11:22:53 -0700 (PDT) Received: by 10.52.109.135 with HTTP; Thu, 12 May 2011 11:22:53 -0700 (PDT) In-Reply-To: References: Date: Thu, 12 May 2011 23:52:53 +0530 Message-ID: Subject: Re: [PERFORM] since when has pg_stat_user_indexes.idx_scan been counting? From: raghu ram To: Willy-Bas Loos Cc: pgsql-performance@postgresql.org, pgsql-admin@postgresql.org Content-Type: multipart/alternative; boundary=bcaec548a2e90814bd04a31847bf X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.897 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201105/91 X-Sequence-Number: 37528 --bcaec548a2e90814bd04a31847bf Content-Type: text/plain; charset=ISO-8859-1 On Thu, May 12, 2011 at 9:09 PM, Willy-Bas Loos wrote: > Hi, > > We have some indexes that don't seem to be used at all. > I'd like to know since when they have not been used. > That is, the time when postgres started counting to reach the number that > is in pg_stat_user_indexes.idx_scan > > Is there a way to retrieve that from the database ? > "Analyze" activity will update the statistics of each catalog table. pg_postmaster_start_time --> Retrieves the Postmaster [ PostgreSQL Instance] start time postgres=# select pg_postmaster_start_time(); --Raghu Ram --bcaec548a2e90814bd04a31847bf Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Thu, May 12, 2011 at 9:09 PM, Willy-B= as Loos <willyba= s@gmail.com> wrote:
Hi,

We have some indexes that don't seem to be used at all.
I= 'd like to know since when they have not been used.
That is, the tim= e when postgres started counting to reach the number that is in pg_stat_use= r_indexes.idx_scan

Is there a way to retrieve that from the database ?


"Analyze" activity will update th= e statistics of each catalog table.

pg_postmaster_= start_time --> Retrieves the Postmaster [ PostgreSQL Instance] start tim= e

postgres=3D# select pg_postmaster_start_time();

--Raghu Ram

--bcaec548a2e90814bd04a31847bf--