mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-06 15:24:56 +08:00
Fix some obsolete information in src/backend/optimizer/README.
Constant quals aren't handled the same way they used to be. Also, add mention of a couple more major steps in grouping_planner. Per complaint a couple months back from Etsuro Fujita.
This commit is contained in:
parent
732758db4c
commit
6331de1d44
@ -297,9 +297,6 @@ planner()
|
|||||||
handle UNION/INTERSECT/EXCEPT, GROUP BY, HAVING, aggregates,
|
handle UNION/INTERSECT/EXCEPT, GROUP BY, HAVING, aggregates,
|
||||||
ORDER BY, DISTINCT, LIMIT
|
ORDER BY, DISTINCT, LIMIT
|
||||||
--query_planner()
|
--query_planner()
|
||||||
pull out constant quals, which can be used to gate execution of the
|
|
||||||
whole plan (if any are found, we make a top-level Result node
|
|
||||||
to do the gating)
|
|
||||||
make list of base relations used in query
|
make list of base relations used in query
|
||||||
split up the qual into restrictions (a=1) and joins (b=c)
|
split up the qual into restrictions (a=1) and joins (b=c)
|
||||||
find qual clauses that enable merge and hash joins
|
find qual clauses that enable merge and hash joins
|
||||||
@ -318,11 +315,11 @@ planner()
|
|||||||
Back at standard_join_search(), apply set_cheapest() to extract the
|
Back at standard_join_search(), apply set_cheapest() to extract the
|
||||||
cheapest path for each newly constructed joinrel.
|
cheapest path for each newly constructed joinrel.
|
||||||
Loop back if this wasn't the top join level.
|
Loop back if this wasn't the top join level.
|
||||||
Back at query_planner:
|
|
||||||
put back any constant quals by adding a Result node
|
|
||||||
Back at grouping_planner:
|
Back at grouping_planner:
|
||||||
|
convert Path tree returned by query_planner into a Plan tree
|
||||||
do grouping(GROUP)
|
do grouping(GROUP)
|
||||||
do aggregates
|
do aggregates
|
||||||
|
do window functions
|
||||||
make unique(DISTINCT)
|
make unique(DISTINCT)
|
||||||
make sort(ORDER BY)
|
make sort(ORDER BY)
|
||||||
make limit(LIMIT/OFFSET)
|
make limit(LIMIT/OFFSET)
|
||||||
|
Loading…
Reference in New Issue
Block a user