pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Index containing records instead of pointers to the data?
3+ messages / 3 participants
[nested] [flat]

* Index containing records instead of pointers to the data?
@ 2011-09-18 20:18 Stefan Keller <sfkeller@gmail.com>
  2011-09-18 20:21 ` Re: Index containing records instead of pointers to the data? Thom Brown <thom@linux.com>
  2011-09-19 01:15 ` Re: Index containing records instead of pointers to the data? Craig James <craig_james@emolecules.com>
  0 siblings, 2 replies; 3+ messages in thread

From: Stefan Keller @ 2011-09-18 20:18 UTC (permalink / raw)
  To: pgsql-performance

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?

Stefan



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Index containing records instead of pointers to the data?
  2011-09-18 20:18 Index containing records instead of pointers to the data? Stefan Keller <sfkeller@gmail.com>
@ 2011-09-18 20:21 ` Thom Brown <thom@linux.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Thom Brown @ 2011-09-18 20:21 UTC (permalink / raw)
  To: Stefan Keller <sfkeller@gmail.com>; +Cc: pgsql-performance

On 18 September 2011 21:18, Stefan Keller <sfkeller@gmail.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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Index containing records instead of pointers to the data?
  2011-09-18 20:18 Index containing records instead of pointers to the data? Stefan Keller <sfkeller@gmail.com>
@ 2011-09-19 01:15 ` Craig James <craig_james@emolecules.com>
  1 sibling, 0 replies; 3+ messages in thread

From: Craig James @ 2011-09-19 01:15 UTC (permalink / raw)
  To: pgsql-performance

On 9/18/11 1:18 PM, Stefan Keller 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?
See my post entitled, "How to make hash indexes fast" for a solution to the additional-disk-access problem.

Craig
>
> Stefan
>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-09-19 01:15 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-09-18 20:18 Index containing records instead of pointers to the data? Stefan Keller <sfkeller@gmail.com>
2011-09-18 20:21 ` Thom Brown <thom@linux.com>
2011-09-19 01:15 ` Craig James <craig_james@emolecules.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox