pgsql: Teach CLUSTER to use seqscan-and-sort when it's faster than inde

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Teach CLUSTER to use seqscan-and-sort when it's faster than inde
Date: 2010-10-08 00:02:00
Message-ID: E1P40PQ-0005Ec-IH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Teach CLUSTER to use seqscan-and-sort when it's faster than indexscan.

... or at least, when the planner's cost estimates say it will be faster.

Leonardo Francalanci, reviewed by Itagaki Takahiro and Tom Lane

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=3ba11d3df2115b04171a8eda8e0389e02578d8d0

Modified Files
--------------
doc/src/sgml/ref/cluster.sgml | 67 +++----
src/backend/commands/cluster.c | 161 ++++++++++++----
src/backend/optimizer/path/costsize.c | 45 +++--
src/backend/optimizer/plan/createplan.c | 3 +
src/backend/optimizer/plan/planmain.c | 3 +-
src/backend/optimizer/plan/planner.c | 123 ++++++++++++-
src/backend/optimizer/prep/prepunion.c | 3 +-
src/backend/optimizer/util/pathnode.c | 2 +
src/backend/optimizer/util/plancat.c | 86 +++++++--
src/backend/utils/sort/tuplesort.c | 310 +++++++++++++++++++++++++++++++
src/include/optimizer/cost.h | 1 +
src/include/optimizer/plancat.h | 2 +
src/include/optimizer/planner.h | 2 +
src/include/utils/tuplesort.h | 43 +++--
14 files changed, 713 insertions(+), 138 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-10-08 00:32:42 pgsql: Eliminate some repetitive coding in tuplesort.c.
Previous Message Robert Haas 2010-10-07 16:23:18 pgsql: Improve WAL reliability documentation, and add more cross-refere