pgsql: This patch makes some improvements to the rtree index - Mailing list pgsql-committers

From neilc@svr1.postgresql.org (Neil Conway)
Subject pgsql: This patch makes some improvements to the rtree index
Date
Msg-id 20050118232604.0063B3A2BC7@svr1.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
This patch makes some improvements to the rtree index implementation:

(1) Keep a pin on the scan's current buffer and mark buffer. This
avoids the need to do a ReadBuffer() for each tuple produced by the
scan. Since ReadBuffer() is expensive, this is a significant win.

(2) Convert a ReleaseBuffer(); ReadBuffer() pair into
ReleaseAndReadBuffer(). Surely not a huge win, but it saves a lock
acquire/release...

(3) Remove a bunch of duplicated code in rtget.c; make rtnext() handle
both the "initial result" and "subsequent result" cases.

(4) Add support for index tuple killing

(5) Remove rtscancache(): it is dead code, for the same reason that
gistscancache() is dead code (an index scan ought not be invoked with
NoMovementScanDirection).

The end result is about a 10% improvement in rtree index scan perf,
according to contrib/rtree_gist/bench.

Modified Files:
--------------
    pgsql/src/backend/access/rtree:
        rtget.c (r1.33 -> r1.34)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/rtree/rtget.c.diff?r1=1.33&r2=1.34)
        rtree.c (r1.85 -> r1.86)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/rtree/rtree.c.diff?r1=1.85&r2=1.86)
        rtscan.c (r1.56 -> r1.57)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/rtree/rtscan.c.diff?r1=1.56&r2=1.57)
    pgsql/src/include/access:
        rtree.h (r1.36 -> r1.37)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/access/rtree.h.diff?r1=1.36&r2=1.37)

pgsql-committers by date:

Previous
From: neilc@svr1.postgresql.org (Neil Conway)
Date:
Subject: pgsql: Replace the use of "0" with "NULL" where appropriate in dllist.c,
Next
From: andrewd@pgfoundry.org (User Andrewd)
Date:
Subject: pgbuildfarm - client-code: - sanity checks for running as root and