Avoid making a separate pass over the query to check for partializability.
Tom Lane <tgl@sss.pgh.pa.us>
Avoid making a separate pass over the query to check for partializability. It's rather silly to make a separate pass over the tlist + HAVING qual, and a separate set of visits to the syscache, when get_agg_clause_costs already has all the required information in hand. This nets out as less code as well as fewer cycles.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/planner.c | modified | +16 −13 |
| src/backend/optimizer/util/clauses.c | modified | +34 −84 |
| src/include/nodes/relation.h | modified | +4 −1 |
| src/include/optimizer/clauses.h | modified | +0 −20 |