Re: COUNT(*) and index-only scans - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: COUNT(*) and index-only scans
Date
Msg-id 1318402228.1724.186.camel@jdavis
Whole thread Raw
In response to Re: COUNT(*) and index-only scans  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: COUNT(*) and index-only scans
List pgsql-hackers
On Tue, 2011-10-11 at 13:22 -0400, Robert Haas wrote:
> The real issue is that the costing estimates need to be accurate, and
> that's where the rubber hits the road.  Otherwise, even if we pick the
> right way to scan the table, we may do silly things up the line when
> we go to start constructing the join order.  I think we need to beef
> up ANALYZE to gather statistics on the fraction of the pages that are
> marked all-visible, or maybe VACUUM should gather that information.
> The trouble is that if we VACUUM and then ANALYZE, we'll often get
> back a value very close to 100%, but then the real value may diminish
> quite a bit before the next auto-analyze fires.  I think if we can
> figure out what to do about that problem we'll be well on our way...

Can you send stats messages to keep track when you unset a bit in the
VM? That might allow it to be more up-to-date.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: Overhead cost of Serializable Snapshot Isolation
Next
From: Pavel Stehule
Date:
Subject: Re: Proposal: casts row to array and array to row