From a87ee007edfa3d71e31cea4adad396888adbcd5a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 10 Jun 2005 03:32:25 +0000 Subject: 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. --- src/include/nodes/relation.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include/nodes/relation.h') diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index ec839d7d3f6..687ef367841 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -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; -- cgit v1.2.3