mirror of
https://github.com/postgres/postgres.git
synced 2026-01-05 23:38:41 +03:00
Quick hack to allow the outer query's tuple_fraction to be passed down
to a subquery if the outer query is simple enough that the LIMIT can be reflected directly to the subquery. This didn't use to be very interesting, because a subquery that couldn't have been flattened into the upper query was usually not going to be very responsive to tuple_fraction anyway. But with new code that allows UNION ALL subqueries to pay attention to tuple_fraction, this is useful to do. In particular this lets the optimization occur when the UNION ALL is directly inside a view.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.113 2005/06/09 04:19:00 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/include/nodes/relation.h,v 1.114 2005/06/10 03:32:25 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -92,6 +92,8 @@ typedef struct PlannerInfo
|
||||
List *query_pathkeys; /* desired pathkeys for query_planner(),
|
||||
* and actual pathkeys afterwards */
|
||||
|
||||
double tuple_fraction; /* tuple_fraction passed to query_planner */
|
||||
|
||||
bool hasJoinRTEs; /* true if any RTEs are RTE_JOIN kind */
|
||||
bool hasHavingQual; /* true if havingQual was non-null */
|
||||
} PlannerInfo;
|
||||
|
||||
Reference in New Issue
Block a user