Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-02-02 Thread Noah Misch
On Wed, Jan 25, 2012 at 08:42:05PM -0500, Robert Haas wrote: Only the first pass of vacuum knows how to mark pages all-visible. After the update, the first pass of the first vacuum sees a dead tuple on the old page and truncates it to a dead line pointer. When it comes to the new page, it

Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-25 Thread Robert Haas
On Sat, Jan 21, 2012 at 9:50 PM, Jeff Janes jeff.ja...@gmail.com wrote: A review: [ review ] Thanks. Committed with hopefully-appropriate revisions. As a side-note, I noticed that I needed to run vacuum twice in a row to get the Heap Fetches to drop to zero.  I vaguely recall that only

Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-21 Thread Jeff Janes
On Fri, Jan 13, 2012 at 7:21 AM, Robert Haas robertmh...@gmail.com wrote: I think that people who are using index-only scans are going to want some way to find out the degree to which the scans are in fact index-only. So here's a 5-line patch that adds the number of heap fetches to the

[HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-13 Thread Robert Haas
I think that people who are using index-only scans are going to want some way to find out the degree to which the scans are in fact index-only. So here's a 5-line patch that adds the number of heap fetches to the EXPLAIN ANALYZE output. This might not be all the instrumentation we'll ever want

Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-13 Thread Magnus Hagander
On Fri, Jan 13, 2012 at 16:21, Robert Haas robertmh...@gmail.com wrote: I think that people who are using index-only scans are going to want some way to find out the degree to which the scans are in fact index-only. So here's a 5-line patch that adds the number of heap fetches to the EXPLAIN

Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-13 Thread Peter Geoghegan
On 13 January 2012 15:21, Robert Haas robertmh...@gmail.com wrote: I think that people who are using index-only scans are going to want some way to find out the degree to which the scans are in fact index-only. So here's a 5-line patch that adds the number of heap fetches to the EXPLAIN

Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-13 Thread Robert Haas
On Fri, Jan 13, 2012 at 10:29 AM, Magnus Hagander mag...@hagander.net wrote: On Fri, Jan 13, 2012 at 16:21, Robert Haas robertmh...@gmail.com wrote: I think that people who are using index-only scans are going to want some way to find out the degree to which the scans are in fact index-only.

Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-13 Thread Peter Geoghegan
On 13 January 2012 15:31, Robert Haas robertmh...@gmail.com wrote: On Fri, Jan 13, 2012 at 10:29 AM, Magnus Hagander mag...@hagander.net wrote: Would also be good to have counter sin pg_stat_* for this, since you'd usually want to look at this kind of data over time as well. In your plans? ;)

Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-13 Thread Robert Haas
On Fri, Jan 13, 2012 at 10:41 AM, Peter Geoghegan pe...@2ndquadrant.com wrote: On 13 January 2012 15:31, Robert Haas robertmh...@gmail.com wrote: On Fri, Jan 13, 2012 at 10:29 AM, Magnus Hagander mag...@hagander.net wrote: Would also be good to have counter sin pg_stat_* for this, since you'd

Re: [HACKERS] show Heap Fetches in EXPLAIN for index-only scans

2012-01-13 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: So here's a 5-line patch that adds the number of heap fetches to the EXPLAIN ANALYZE output. This might not be all the instrumentation we'll ever want here, but I think we at least want this much. Cosmetic gripes: 1. Please initialize the counter in