Re: Bitmap scans vs. the statistics views - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Bitmap scans vs. the statistics views
Date
Msg-id 12416.1114200121@sss.pgh.pa.us
Whole thread Raw
In response to Re: Bitmap scans vs. the statistics views  (Josh Berkus <josh@agliodbs.com>)
List pgsql-hackers
Josh Berkus <josh@agliodbs.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Bitmap scans vs. the statistics views
Next
From: "Dave Held"
Date:
Subject: Re: Woo hoo ... a whole new set of compiler headaches!! :)