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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-hackers by date

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