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

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

> 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.   It probably belongs elsewhere, such as pg_stats_all_tables with 
the overall fetch counts.

> In 
> particular the function design assumes that heap tuple fetches can be
> tied to particular indexes, which is now a broken assumption.  You
> might be amused by this test case I just finished debugging:

Well, I'd be in favor of moving the "useful" version of tuples_returned to 
pg_stat_*_tables as an overall count.  However, we cant drop the column from 
pg_stat_indexes without breaking apps; at best, we'd have to warn people of 
the accuracy issues and give it a few versions before we dropped it.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Bitmap scans vs. the statistics views
Next
From: Stephen Frost
Date:
Subject: Re: Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords