1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-27 00:12:01 +03:00

Finish implementation of hashed aggregation. Add enable_hashagg GUC

parameter to allow it to be forced off for comparison purposes.
Add ORDER BY clauses to a bunch of regression test queries that will
otherwise produce randomly-ordered output in the new regime.
This commit is contained in:
Tom Lane
2002-11-21 00:42:20 +00:00
parent 2676e11fdf
commit 6c1d4662af
25 changed files with 457 additions and 190 deletions

View File

@@ -7,15 +7,17 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: cost.h,v 1.47 2002/09/04 20:31:44 momjian Exp $
* $Id: cost.h,v 1.48 2002/11/21 00:42:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
#ifndef COST_H
#define COST_H
#include "nodes/plannodes.h"
#include "nodes/relation.h"
/* defaults for costsize.c's Cost parameters */
/* NB: cost-estimation code should use the variables, not these constants! */
/* If you change these, update backend/utils/misc/postgresql.sample.conf */
@@ -42,6 +44,7 @@ extern bool enable_seqscan;
extern bool enable_indexscan;
extern bool enable_tidscan;
extern bool enable_sort;
extern bool enable_hashagg;
extern bool enable_nestloop;
extern bool enable_mergejoin;
extern bool enable_hashjoin;
@@ -56,7 +59,16 @@ extern void cost_tidscan(Path *path, Query *root,
extern void cost_functionscan(Path *path, Query *root,
RelOptInfo *baserel);
extern void cost_sort(Path *path, Query *root,
List *pathkeys, double tuples, int width);
List *pathkeys, Cost input_cost, double tuples, int width);
extern void cost_agg(Path *path, Query *root,
AggStrategy aggstrategy, int numAggs,
int numGroupCols, double numGroups,
Cost input_startup_cost, Cost input_total_cost,
double input_tuples);
extern void cost_group(Path *path, Query *root,
int numGroupCols, double numGroups,
Cost input_startup_cost, Cost input_total_cost,
double input_tuples);
extern void cost_nestloop(Path *path, Query *root,
Path *outer_path, Path *inner_path,
List *restrictlist);

View File

@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: planmain.h,v 1.62 2002/11/19 23:22:00 tgl Exp $
* $Id: planmain.h,v 1.63 2002/11/21 00:42:19 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -34,12 +34,14 @@ extern Sort *make_sort(Query *root, List *tlist,
Plan *lefttree, int keycount);
extern Sort *make_sort_from_pathkeys(Query *root, List *tlist,
Plan *lefttree, List *pathkeys);
extern Agg *make_agg(List *tlist, List *qual, AggStrategy aggstrategy,
int ngrp, AttrNumber *grpColIdx,
extern Agg *make_agg(Query *root, List *tlist, List *qual,
AggStrategy aggstrategy,
int numGroupCols, AttrNumber *grpColIdx,
long numGroups, int numAggs,
Plan *lefttree);
extern Group *make_group(List *tlist,
int ngrp, AttrNumber *grpColIdx, double numGroups,
extern Group *make_group(Query *root, List *tlist,
int numGroupCols, AttrNumber *grpColIdx,
double numGroups,
Plan *lefttree);
extern Material *make_material(List *tlist, Plan *lefttree);
extern Unique *make_unique(List *tlist, Plan *lefttree, List *distinctList);