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

From Tom Lane
Subject Bitmap scans vs. the statistics views
Date
Msg-id 5641.1114192739@sss.pgh.pa.us
Whole thread Raw
Responses Re: Bitmap scans vs. the statistics views
List pgsql-hackers
I'm currently finding that the stats regression test fails with
bitmapped index scans enabled:

*** 62,68 ****  WHERE st.relname='tenk2' AND cl.relname='tenk2';  ?column? | ?column? | ?column? | ?column?
----------+----------+----------+----------
!  t        | t        | t        | t (1 row)
 SELECT st.heap_blks_read + st.heap_blks_hit >= pr.heap_blks + cl.relpages,
--- 62,68 ----  WHERE st.relname='tenk2' AND cl.relname='tenk2';  ?column? | ?column? | ?column? | ?column?
----------+----------+----------+----------
!  t        | t        | f        | f (1 row)
 SELECT st.heap_blks_read + st.heap_blks_hit >= pr.heap_blks + cl.relpages,


The reason for this appears to be that the standard stats views
disregard tuples_fetched for tables, but tuples_fetched is the only
counter that's getting bumped in a bitmap scan.

I could probably add some code to bump tuples_returned as well,
but I wonder whether something more drastic isn't needed.  The
stats views seem to be designed around the assumption that there
are seqscans and indexscans and nothing else.  Do we need to
expand the number of functions and rows to allow for a third basic
scan type, or do we want to fuzz things up?

Comments anyone?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Woo hoo ... a whole new set of compiler headaches!!
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Proposal for background vacuum full/cluster