Re: Another idea for index-only scans - Mailing list pgsql-hackers

From Luke Lonergan
Subject Re: Another idea for index-only scans
Date
Msg-id C3E62232E3BCF24CBA20D72BFDCB6BF8044A1BF2@MI8NYCMAIL08.Mi8.com
Whole thread Raw
In response to Another idea for index-only scans  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
<p><font size="2">A hybrid scan approach combined with this idea would fit nicely - provide results for tids that are
directlyvisible and set a bit in a bitmap for those that need recheck and extend recheck to take a bitmap (wait - it
alreadydoes :-)<br /><br /> - Luke<br /><br /> Msg is shrt cuz m on ma treo<br /><br />  -----Original Message-----<br
/>From:   Gregory Stark [<a href="mailto:stark@enterprisedb.com">mailto:stark@enterprisedb.com</a>]<br /> Sent:  
Wednesday,August 15, 2007 02:58 PM Eastern Standard Time<br /> To:     Bruce Momjian<br /> Cc:    
PostgreSQL-development<br/> Subject:        Re: [HACKERS] Another idea for index-only scans<br /><br /> "Bruce Momjian"
<bruce@momjian.us>writes:<br /><br /> > I have added another idea for index-only scans to the TODO list:<br />
><br/> >>   A third idea would be for a heap scan to check if all rows are visible<br /> >>   and if so
seta per-table flag which can be checked by index scans.<br /> >>   Any change to the table would have to clear
theflag.  To detect<br /> >>   changes during the heap scan a counter could be set at the start and<br />
>>  checked at the end --- if it is the same, the table has not been<br /> >>   modified --- any table
changewould increment the counter.<br /><br /> I think I would prefer to address this in the same infrastructure as
the<br/> dead-space-map. That way you're not dependent on having no updates happening<br /> on the table at all. Any
tupleson pages which contain no in-doubt tuples<br /> could have their visibility check skipped but when you come
acrossa tuple on<br /> a page which has been modified since the last vacuum then you have to check<br /> the
visibility.<br/><br /> --<br />   Gregory Stark<br />   EnterpriseDB          <a
href="http://www.enterprisedb.com">http://www.enterprisedb.com</a><br/><br /> ---------------------------(end of
broadcast)---------------------------<br/> TIP 4: Have you searched our list archives?<br /><br />                <a
href="http://archives.postgresql.org">http://archives.postgresql.org</a><br/></font> 

pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: XID wraparound and busy databases
Next
From: "Marc G. Fournier"
Date:
Subject: Re: CVS corruption/mistagging?