Обсуждение: Index containing records instead of pointers to the data?
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
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
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 >