Re: Index containing records instead of pointers to the data?

From: Thom Brown <thom(at)linux(dot)com>
To: Stefan Keller <sfkeller(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Index containing records instead of pointers to the data?
Date: 2011-09-18 20:21:52
Message-ID: CAA-aLv5LnrkfUQV1djitxV2vrsiBK=fRinKPn5cxyUey1+4w1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 18 September 2011 21:18, Stefan Keller <sfkeller(at)gmail(dot)com> wrote:
> Hi,
>
> Sorry if this is an odd question:
> I assume that Postgres indexes don't store records but only pointers
> to the data.
> This means, that there is always an additional access needed (real table I/O).
> Would an index containing data records make sense?

Yes, it's called a covering index, where the data required to produce
results for the query are entirely contained in the index. That
should be hopefully coming in 9.2.

See http://wiki.postgresql.org/wiki/Index-only_scans

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig James 2011-09-19 01:14:01 How to make hash indexes fast
Previous Message Stefan Keller 2011-09-18 20:18:45 Index containing records instead of pointers to the data?