Simplify partial path generation in GROUP BY/ORDER BY
David Rowley <drowley@postgresql.org>
Simplify partial path generation in GROUP BY/ORDER BY Here we consolidate the generation of partial sort and partial incremental sort paths in a similar way to what was done in 4a29eabd1. Since the cost penalty for incremental sort was removed by that commit, there's no point in creating a sort path on the cheapest partial path if an incremental sort could be done instead. This has the added benefit of reducing the amount of code required to build these paths. Author: Richard Guo Reviewed-by: Etsuro Fujita, Shubham Khanna, David Rowley Discussion: https://postgr.es/m/CAMbWs49PaKxBZU9cN7k3DKB7id+YfGfOfS9H_Fo5tkqPMt=fDg@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/plan/planner.c | modified | +77 −124 |
| src/test/regress/expected/select_parallel.out | modified | +53 −0 |
| src/test/regress/sql/select_parallel.sql | modified | +26 −0 |
Discussion
- Some revises in adding sorting path 17 messages · 2023-01-10 → 2024-01-31