Eric Ridge <ebr@tcdi.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