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

pgsql: Create a "sort support" interface API for faster sorting.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Create a "sort support" interface API for faster sorting.
Date: 2011-12-07 05:19:51
Message-ID: E1RY9v5-0006gG-9I@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Create a "sort support" interface API for faster sorting.

This patch creates an API whereby a btree index opclass can optionally
provide non-SQL-callable support functions for sorting.  In the initial
patch, we only use this to provide a directly-callable comparator function,
which can be invoked with a bit less overhead than the traditional
SQL-callable comparator.  While that should be of value in itself, the real
reason for doing this is to provide a datatype-extensible framework for
more aggressive optimizations, as in Peter Geoghegan's recent work.

Robert Haas and Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c6e3ac11b60ac4a8942ab964252d51c1c0bd8845

Modified Files
--------------
doc/src/sgml/ref/alter_opfamily.sgml     |    9 +-
doc/src/sgml/ref/create_opclass.sgml     |   15 ++--
doc/src/sgml/xindex.sgml                 |   34 +++++--
src/backend/access/nbtree/nbtcompare.c   |  106 ++++++++++++++++++++
src/backend/commands/analyze.c           |   28 +++---
src/backend/commands/opclasscmds.c       |   88 ++++++++++-------
src/backend/executor/nodeMergeAppend.c   |   77 +++-----------
src/backend/executor/nodeMergejoin.c     |  146 +++++++++++-----------------
src/backend/utils/adt/date.c             |   23 +++++
src/backend/utils/adt/float.c            |   37 +++++++
src/backend/utils/adt/timestamp.c        |   19 ++++
src/backend/utils/cache/lsyscache.c      |   43 +++++---
src/backend/utils/sort/Makefile          |    2 +-
src/backend/utils/sort/sortsupport.c     |  160 ++++++++++++++++++++++++++++++
src/backend/utils/sort/tuplesort.c       |  143 ++++++++-------------------
src/bin/pg_dump/pg_dump.c                |   30 +++++-
src/include/access/nbtree.h              |   15 ++-
src/include/catalog/catversion.h         |    2 +-
src/include/catalog/pg_am.h              |    2 +-
src/include/catalog/pg_amproc.h          |   10 ++
src/include/catalog/pg_proc.h            |   18 ++++
src/include/nodes/execnodes.h            |    5 +-
src/include/utils/builtins.h             |   15 +++-
src/include/utils/date.h                 |    1 +
src/include/utils/lsyscache.h            |    4 +-
src/include/utils/sortsupport.h          |  156 +++++++++++++++++++++++++++++
src/include/utils/timestamp.h            |    1 +
src/include/utils/tuplesort.h            |   15 ---
src/test/regress/expected/opr_sanity.out |   45 ++++-----
src/test/regress/sql/opr_sanity.sql      |   43 ++++-----
30 files changed, 870 insertions(+), 422 deletions(-)

pgsql-committers by date

Next:From: Magnus HaganderDate: 2011-12-07 09:37:50
Subject: pgsql: Remove spclocation field from pg_tablespace
Previous:From: Robert HaasDate: 2011-12-06 20:55:53
Subject: pgsql: Typo fixes for commit 2ad36c4e44c8b513f6155656e1b7a8d26715bb94.

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