]> granicus.if.org Git - postgresql/commit
Teach CLUSTER to use seqscan-and-sort when it's faster than indexscan.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Oct 2010 00:00:28 +0000 (20:00 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 8 Oct 2010 00:00:28 +0000 (20:00 -0400)
commit3ba11d3df2115b04171a8eda8e0389e02578d8d0
tree9ae749f1499b9e0e00032272d7a5d1c3f1266c02
parent694c56af2b586551afda624901d6dec951b58027
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
14 files changed:
doc/src/sgml/ref/cluster.sgml
src/backend/commands/cluster.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/planner.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/plancat.c
src/backend/utils/sort/tuplesort.c
src/include/optimizer/cost.h
src/include/optimizer/plancat.h
src/include/optimizer/planner.h
src/include/utils/tuplesort.h