From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Use appendrel planning logic for top-level UNION ALL structures. |
Date: | 2010-11-08 20:16:17 |
Message-ID: | E1PFY8X-0003Go-Tv@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Use appendrel planning logic for top-level UNION ALL structures.
Formerly, we could convert a UNION ALL structure inside a subquery-in-FROM
into an appendrel, as a side effect of pulling up the subquery into its
parent; but top-level UNION ALL always caused use of plan_set_operations().
That didn't matter too much because you got an Append-based plan either
way. However, now that the appendrel code can do things with MergeAppend,
it's worthwhile to hack up the top-level case so it also uses appendrels.
This is a bit of a stopgap; but going much further than this will require
a major rewrite of the planner's set-operations support, which I'm not
prepared to undertake now. For the moment let's grab the low-hanging fruit.
Branch
------
master
Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=947d0c862c895618a874344322e7b07c9df05cb2
Modified Files
--------------
src/backend/optimizer/plan/planner.c | 11 +++-
src/backend/optimizer/prep/prepjointree.c | 121 ++++++++++++++++++++++++++---
src/include/optimizer/prep.h | 1 +
3 files changed, 121 insertions(+), 12 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2010-11-08 22:01:44 | pgsql: Fix permanent memory leak in autovacuum launcher |
Previous Message | User Hinoue | 2010-11-08 14:49:36 | psqlodbc - psqlodbc: Don't propgate the connection level statment |