Skip site navigation (1) Skip section navigation (2)

pgsql: Teach SP-GiST to do index-only scans.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Teach SP-GiST to do index-only scans.
Date: 2011-12-19 19:58:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-committers
Teach SP-GiST to do index-only scans.

Operator classes can specify whether or not they support this; this
preserves the flexibility to use lossy representations within an index.

In passing, move constant data about a given index into the rd_amcache
cache area, instead of doing fresh lookups each time we start an index
operation.  This is mainly to try to make sure that spgcanreturn() has
insignificant cost; I still don't have any proof that it matters for
actual index accesses.  Also, get rid of useless copying of FmgrInfo
pointers; we can perfectly well use the relcache's versions in-place.



Modified Files
doc/src/sgml/spgist.sgml                    |   15 +++
src/backend/access/spgist/spgdoinsert.c     |    9 +-
src/backend/access/spgist/spgkdtreeproc.c   |    1 +
src/backend/access/spgist/spgquadtreeproc.c |    4 +
src/backend/access/spgist/spgscan.c         |   97 +++++++++++++---
src/backend/access/spgist/spgtextproc.c     |   13 ++-
src/backend/access/spgist/spgutils.c        |  170 +++++++++++++--------------
src/include/access/spgist.h                 |    4 +
src/include/access/spgist_private.h         |   31 ++++--
src/test/regress/expected/create_index.out  |  118 +++++++++---------
10 files changed, 288 insertions(+), 174 deletions(-)

pgsql-committers by date

Next:From: Alvaro HerreraDate: 2011-12-19 20:31:42
Subject: pgsql: Allow CHECK constraints to be declared ONLY
Previous:From: Tom LaneDate: 2011-12-18 20:50:47
Subject: pgsql: Replace simple constant pg_am.amcanreturn with an AM supportfun

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group