Skip site navigation (1) Skip section navigation (2)

Re: Bitmap scans vs. the statistics views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: josh(at)agliodbs(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org, Jan Wieck <JanWieck(at)yahoo(dot)com>
Subject: Re: Bitmap scans vs. the statistics views
Date: 2005-04-22 20:02:01
Message-ID: 12416.1114200121@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> I've never fully understood the distinction the stats make between
>> "tuples fetched" and "tuples returned", and it's even less obvious how
>> to apply it when the index and heap operations are decoupled. 

> Well, it's mainly a counter to measure how many dead rows are in your active 
> data set.

You may think that's what it is, but given where the counts are actually
placed in the code, it does no such thing.  AFAICS there is no count of
dead tuples at all in the seqscan case, and in the indexscan case the
only counter that advances before the snapshot test is
pgstat_count_index_scan, which isn't counting tuples so much as
amgetnext calls, and is documented in a way that suggests it does
something completely different :-(

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Antoine MartinDate: 2005-04-22 20:02:21
Subject: Re: Postgres: pg_hba.conf, md5, pg_shadow, encrypted
Previous:From: Tom LaneDate: 2005-04-22 19:53:23
Subject: Re: Bitmap scans vs. the statistics views

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group