help interpreting pg_stat_user_index view values

From: <dennisr(at)visi(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: help interpreting pg_stat_user_index view values
Date: 2014-01-04 06:53:17
Message-ID: 009101cf0919$a572a4a0$f057ede0$@visi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Need some help interpreting the results of queries against the
pg_stat_user_index view.

Given the following four contrieved indexes and their scan, read and fetch
values in pg_stat_user_index view:

Index name idx_scan idx_tup_read idx_tup_fetch
idx1 100 0
0
idx2 100 200 0
idx3 100 200 50
idx4 100 0
200

Is idx1 a "useless" index? Is it being scanned but nevering returns useful
tuples because it doesn't point to any useful rows in the table? Or maybe
the query planner looked at the index but decided to use a table scan
instead?

Is idx2 a "useless" index? Is this index being scanned but nevering returns
useful tuples because it doesn't point to any useful rows in the table?

For idx3 do it's values mean it's column specificity is not specific enough
to be a relatively useful index?

I am assuming an index with values like idx4 could never exist, it is an
impossible result. Is that a correct assumption?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Johnston 2014-01-04 07:44:52 Re: returning json data row from json query
Previous Message Jayadevan M 2014-01-04 05:29:16 Re: authentication failure