mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +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:
@@ -15,7 +15,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.218 2002/11/15 02:50:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.219 2002/11/19 23:21:58 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -1865,8 +1865,8 @@ _copyQuery(Query *from)
|
||||
|
||||
/*
|
||||
* We do not copy the planner internal fields: base_rel_list,
|
||||
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys. Not
|
||||
* entirely clear if this is right?
|
||||
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys,
|
||||
* hasJoinRTEs. Not entirely clear if this is right?
|
||||
*/
|
||||
|
||||
return newnode;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.164 2002/11/15 02:50:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.165 2002/11/19 23:21:58 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -628,9 +628,9 @@ _equalQuery(Query *a, Query *b)
|
||||
|
||||
/*
|
||||
* We do not check the internal-to-the-planner fields: base_rel_list,
|
||||
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys. They
|
||||
* might not be set yet, and in any case they should be derivable from
|
||||
* the other fields.
|
||||
* other_rel_list, join_rel_list, equi_key_list, query_pathkeys,
|
||||
* hasJoinRTEs. They might not be set yet, and in any case they should
|
||||
* be derivable from the other fields.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user