Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Postgres 8.4 when you do:

select * from pg_stat_all_indexes where relname = 'table_name';

It returns the fields idx_tup_read and idx_tup_fetch, what is the difference?

share|improve this question
up vote 8 down vote accepted

When looking at the source code of the view, then you'll see that idx_tup_read is the result of calling pg_stat_get_tuples_returned() and idx_tup_fetch is the result of calling pg_stat_get_tuples_fetched()

The manual describes the two functions as follows:


Number of rows read by sequential scans when argument is a table, or number of index entries returned when argument is an index


Number of table rows fetched by bitmap scans when argument is a table, or table rows fetched by simple index scans using the index when argument is an index

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.