Bitmap scans vs. the statistics views

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Bitmap scans vs. the statistics views
Date: 2005-04-22 17:58:59
Message-ID: 5641.1114192739@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2005-04-22 18:03:48 Re: Proposal for background vacuum full/cluster
Previous Message Andrew Dunstan 2005-04-22 17:45:38 Re: Woo hoo ... a whole new set of compiler headaches!!