mirror of
https://github.com/postgres/postgres.git
synced 2025-10-27 00:12:01 +03:00
Add an at-least-marginally-plausible method of estimating the number
of groups produced by GROUP BY. This improves the accuracy of planning estimates for grouped subselects, and is needed to check whether a hashed aggregation plan risks memory overflow.
This commit is contained in:
@@ -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.61 2002/11/06 00:00:45 tgl Exp $
|
||||
* $Id: planmain.h,v 1.62 2002/11/19 23:22:00 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -35,8 +35,11 @@ extern Sort *make_sort(Query *root, List *tlist,
|
||||
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, Plan *lefttree);
|
||||
extern Group *make_group(List *tlist, int ngrp, AttrNumber *grpColIdx,
|
||||
int ngrp, AttrNumber *grpColIdx,
|
||||
long numGroups, int numAggs,
|
||||
Plan *lefttree);
|
||||
extern Group *make_group(List *tlist,
|
||||
int ngrp, AttrNumber *grpColIdx, double numGroups,
|
||||
Plan *lefttree);
|
||||
extern Material *make_material(List *tlist, Plan *lefttree);
|
||||
extern Unique *make_unique(List *tlist, Plan *lefttree, List *distinctList);
|
||||
@@ -54,6 +57,7 @@ extern void build_base_rel_tlists(Query *root, List *tlist);
|
||||
extern Relids distribute_quals_to_rels(Query *root, Node *jtnode);
|
||||
extern void process_implied_equality(Query *root, Node *item1, Node *item2,
|
||||
Oid sortop1, Oid sortop2);
|
||||
extern bool vars_known_equal(Query *root, Var *var1, Var *var2);
|
||||
|
||||
/*
|
||||
* prototypes for plan/setrefs.c
|
||||
|
||||
Reference in New Issue
Block a user