mirror of
https://github.com/postgres/postgres.git
synced 2025-06-30 21:42:05 +03:00
First phase of implementing hash-based grouping/aggregation. An AGG plan
node now does its own grouping of the input rows, and has no need for a preceding GROUP node in the plan pipeline. This allows elimination of the misnamed tuplePerGroup option for GROUP, and actually saves more code in nodeGroup.c than it costs in nodeAgg.c, as well as being presumably faster. Restructure the API of query_planner so that we do not commit to using a sorted or unsorted plan in query_planner; instead grouping_planner makes the decision. (Right now it isn't any smarter than query_planner was, but that will change as soon as it has the option to select a hash- based aggregation step.) Despite all the hackery, no initdb needed since only in-memory node types changed.
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994-5, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.89 2002/10/14 04:26:54 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.90 2002/11/06 00:00:43 tgl Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -275,7 +275,21 @@ explain_outNode(StringInfo str, Plan *plan, Plan *outer_plan,
|
||||
pname = "Group";
|
||||
break;
|
||||
case T_Agg:
|
||||
pname = "Aggregate";
|
||||
switch (((Agg *) plan)->aggstrategy)
|
||||
{
|
||||
case AGG_PLAIN:
|
||||
pname = "Aggregate";
|
||||
break;
|
||||
case AGG_SORTED:
|
||||
pname = "GroupAggregate";
|
||||
break;
|
||||
case AGG_HASHED:
|
||||
pname = "HashAggregate";
|
||||
break;
|
||||
default:
|
||||
pname = "Aggregate ???";
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case T_Unique:
|
||||
pname = "Unique";
|
||||
|
Reference in New Issue
Block a user