Re: [HACKERS] Another idea for index-only scans

2007-08-18 Thread James Mansion
Decibel! wrote: The advantage to Bruce's idea is that it sounds pretty simple to implement. While it wouldn't be of use for many general cases, it *would* be useful for read-only tables, ie: old partitions. Wouldn't the mostcommon case by foreign key checks against tables that essentially map

Re: [HACKERS] Another idea for index-only scans

2007-08-16 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: >> On Wed, 2007-08-15 at 11:54 -0400, Bruce Momjian wrote: >>> A third idea would be for a heap scan to check if all rows are visible >>> and if so set a per-table flag which can be checked by index scans. > I think it's too coarse-grained to be really us

Re: [HACKERS] Another idea for index-only scans

2007-08-16 Thread Decibel!
On Thu, Aug 16, 2007 at 04:06:35PM -0400, Alvaro Herrera wrote: > Jeff Davis wrote: > > On Wed, 2007-08-15 at 11:54 -0400, Bruce Momjian wrote: > > > I have added another idea for index-only scans to the TODO list: > > > > > > > A third idea would be for a heap scan to check if all rows are visi

Re: [HACKERS] Another idea for index-only scans

2007-08-16 Thread Alvaro Herrera
Jeff Davis wrote: > On Wed, 2007-08-15 at 11:54 -0400, Bruce Momjian wrote: > > I have added another idea for index-only scans to the TODO list: > > > > > A third idea would be for a heap scan to check if all rows are visible > > > and if so set a per-table flag which can be checked by index s

Re: [HACKERS] Another idea for index-only scans

2007-08-16 Thread Jeff Davis
On Wed, 2007-08-15 at 11:54 -0400, Bruce Momjian wrote: > I have added another idea for index-only scans to the TODO list: > > > A third idea would be for a heap scan to check if all rows are visible > > and if so set a per-table flag which can be checked by index scans. > > Any change to th

Re: [HACKERS] Another idea for index-only scans

2007-08-15 Thread Decibel!
On Aug 15, 2007, at 1:54 PM, Gregory Stark wrote: A third idea would be for a heap scan to check if all rows are visible and if so set a per-table flag which can be checked by index scans. Any change to the table would have to clear the flag. To detect changes during the heap scan a

Re: [HACKERS] Another idea for index-only scans

2007-08-15 Thread Bruce Momjian
Gregory Stark wrote: > "Bruce Momjian" <[EMAIL PROTECTED]> writes: > > > I have added another idea for index-only scans to the TODO list: > > > >> A third idea would be for a heap scan to check if all rows are visible > >> and if so set a per-table flag which can be checked by index scans. > >

Re: [HACKERS] Another idea for index-only scans

2007-08-15 Thread Luke Lonergan
Message- From: Gregory Stark [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 15, 2007 02:58 PM Eastern Standard Time To: Bruce Momjian Cc: PostgreSQL-development Subject:Re: [HACKERS] Another idea for index-only scans "Bruce Momjian" <[EMAIL PROTECTED]> writes:

Re: [HACKERS] Another idea for index-only scans

2007-08-15 Thread Gregory Stark
"Bruce Momjian" <[EMAIL PROTECTED]> writes: > I have added another idea for index-only scans to the TODO list: > >> A third idea would be for a heap scan to check if all rows are visible >> and if so set a per-table flag which can be checked by index scans. >> Any change to the table would h

Re: [HACKERS] Another idea for index-only scans

2007-08-15 Thread Josh Berkus
Bruce, > I have added another idea for index-only scans to the TODO list: > > A third idea would be for a heap scan to check if all rows are > > visible and if so set a per-table flag which can be checked by index > > scans. Any change to the table would have to clear the flag. To > > detect ch

Re: [HACKERS] Another idea for index-only scans

2007-08-15 Thread Mike Rylander
On 8/15/07, Bruce Momjian <[EMAIL PROTECTED]> wrote: > I have added another idea for index-only scans to the TODO list: > > > A third idea would be for a heap scan to check if all rows are visible > > and if so set a per-table flag which can be checked by index scans. > > Any change to the ta

[HACKERS] Another idea for index-only scans

2007-08-15 Thread Bruce Momjian
I have added another idea for index-only scans to the TODO list: > A third idea would be for a heap scan to check if all rows are visible > and if so set a per-table flag which can be checked by index scans. > Any change to the table would have to clear the flag. To detect > changes durin