Re: Is index enough to do simple fetch, or table is always used too?

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "David Rowley" <dgrowley(at)gmail(dot)com>
Cc: dmitry(at)koterov(dot)ru, "Postgres General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is index enough to do simple fetch, or table is always used too?
Date: 2008-12-15 14:12:19
Message-ID: b42b73150812150612s5077448du66f37d99e008d153@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Dec 14, 2008 at 4:15 PM, David Rowley <dgrowley(at)gmail(dot)com> wrote:
> The index does not know if the row is dead or alive to the current
> transaction. This is only known by the heap. So for your example query
> to execute, it may be possible to scan the index but the heap will
> need to be checked to see if the row is alive or dead.

There are some plans to use the new visibility map feature (coming in
8.4) to allow index only lookups under certain conditions. That
wouldn't happen until 8.5 at the earliest however.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2008-12-15 14:14:05 Re: PostgreSQL installation
Previous Message Raymond O'Donnell 2008-12-15 13:06:53 Re: PostgreSQL installation