Re: Another idea for index-only scans

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Another idea for index-only scans
Date: 2007-08-16 19:04:40
Message-ID: 1187291080.24679.15.camel@dogma.ljc.laika.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 the table would have to clear the flag. To detect
> > changes during the heap scan a counter could be set at the start and
> > checked at the end --- if it is the same, the table has not been
> > modified --- any table change would increment the counter.
>

This sounds useful for read-only or read-mostly tables.

However, it also sounds a little dangerous. If you test your application
performance, but not thoroughly enough, you might end up with a surprise
when going into production.

Regards,
Jeff Davis

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2007-08-16 19:58:48 Re: tsearch2 in PostgreSQL 8.3?
Previous Message Bruce Momjian 2007-08-16 19:02:23 Re: XID wraparound and busy databases