Incremental sort
Sorting input already ordered by a key prefix group by group, and the planner paths using it. Introduced in PostgreSQL 13.
Versions
- PostgreSQL 20 · in-development · improved · minor · 1 commit · +31 / -7 lines
- PostgreSQL 19 · shipped · improved · moderate · 1 commit · +217 / -52 lines
- PostgreSQL 18 · shipped · improved · moderate · 1 commit · +184 / -41 lines
- PostgreSQL 17 · shipped · improved · moderate · 1 commit · +77 / -25 lines
- PostgreSQL 16 · worked-on · improved · moderate
Threads
- Incremental Sort crash on a rescan that becomes bounded
- Show estimated number of groups for IncrementalSort in EXPLAIN
- Redundant parameter in the get_useful_pathkeys_for_relation
- Consider explicit incremental sort for Append and MergeAppend
- Incremental Sort Cost Estimation Instability
- BUG #18902: TRAP:: failed Assert("!is_sorted") in File: "createplan.c"
- Why don't we consider explicit Incremental Sort?
- Some revises in adding sorting path
- cost_incremental_sort() and limit_tuples
- Incremental sort for access method with ordered scan support (amcanorderbyop)
- Memory leak in incremental sort re-scan
- Server closed the connection unexpectedly
- Allow DISTINCT to use Incremental Sort
- The drop-index-concurrently-1 isolation test no longer tests what it was meant to
- Is select_outer_pathkeys_for_merge() too strict now we have Incremental Sorts?
- incremental sort vs. gather paths
- enable_incremental_sort changes query behavior
- BUG #16846: "retrieved too many tuples in a bounded sort"
- Why does create_gather_merge_plan need make_sort?
- Fix generate_useful_gather_paths for parallel unsafe pathkeys
- segfault with incremental sort
- support IncrementalSortPath type in outNode()
- BUG #16741: Error: subplan "SubPlan 1" was not initialized
- [sqlsmith] parallel worker errors "subplan ... was not initialized"
- RE: Use of "long" in incremental sort code
- BUG #16683: explain plan format xml produces invalid xml
- Possible NULL dereferencing null pointer (src/backend/executor/nodeIncrementalSort.c)
- Incremental sort docs and release announcement
- Use incremental sort paths for window functions
- Use of "long" in incremental sort code
- [PATCH] Incremental sort (was: PoC: Partial sort)
- suggest to rename enable_incrementalsort
- Failures with installcheck and low work_mem value in 13~
- [PATCH] Fix division by zero (explain.c)
- Incremental sorts and EXEC_FLAG_REWIND
- Re: sqlsmith crash incremental sort