Re: How reliable are the stats collector stats?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eric Ridge <ebr(at)tcdi(dot)com>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: How reliable are the stats collector stats?
Date: 2004-03-13 05:51:03
Message-ID: 15504.1079157063@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Eric Ridge <ebr(at)tcdi(dot)com> writes:
> Could pg_stats_user_indexes be lying?

Jan probably knows this stuff better than I, but my guess is that if the
counter type you are looking at is incrementing at all, then it's not
too far off. I certainly can't think of a failure mechanism that would
cause some indexes to be shown with zero hits when other indexes do
get hits.

> I realize the real question is "why aren't these indexes being used",

Up to a point. If it's a unique index then you may want the
uniqueness-check functionality even if the index is never used for
searches. (I think that pg_stats only counts search probes, not
accesses made in connection with insertions, but I'm too tired to
go double-check this.)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Eric B.Ridge 2004-03-13 06:27:38 Re: How reliable are the stats collector stats?
Previous Message Tom Lane 2004-03-13 04:39:48 Re: postgres FROM clause problem