diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2010-10-07 20:00:28 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2010-10-07 20:00:28 -0400 |
| commit | 3ba11d3df2115b04171a8eda8e0389e02578d8d0 (patch) | |
| tree | 9ae749f1499b9e0e00032272d7a5d1c3f1266c02 /src/backend/optimizer/prep/prepunion.c | |
| parent | 694c56af2b586551afda624901d6dec951b58027 (diff) | |
| download | postgresql-3ba11d3df2115b04171a8eda8e0389e02578d8d0.tar.gz | |
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
Diffstat (limited to 'src/backend/optimizer/prep/prepunion.c')
| -rw-r--r-- | src/backend/optimizer/prep/prepunion.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index f904258280..0d3a739175 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -805,7 +805,8 @@ choose_hashed_setop(PlannerInfo *root, List *groupClauses, sorted_p.total_cost = input_plan->total_cost; /* XXX cost_sort doesn't actually look at pathkeys, so just pass NIL */ cost_sort(&sorted_p, root, NIL, sorted_p.total_cost, - input_plan->plan_rows, input_plan->plan_width, -1.0); + input_plan->plan_rows, input_plan->plan_width, + 0.0, work_mem, -1.0); cost_group(&sorted_p, root, numGroupCols, dNumGroups, sorted_p.startup_cost, sorted_p.total_cost, input_plan->plan_rows); |
