aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam
diff options
context:
space:
mode:
authorDavid Rowley <drowley@postgresql.org>2023-01-11 10:25:43 +1300
committerDavid Rowley <drowley@postgresql.org>2023-01-11 10:25:43 +1300
commit3c6fc58209f24b959ee18f5d19ef96403d08f15c (patch)
tree6c27d7704fa2bc60554f1383c787ada232c6837c /src/backend/access/transam
parente5b8a4c098ad6add39626a14475148872cd687e0 (diff)
downloadpostgresql-3c6fc58209f24b959ee18f5d19ef96403d08f15c.tar.gz
postgresql-3c6fc58209f24b959ee18f5d19ef96403d08f15c.zip
Have the planner consider Incremental Sort for DISTINCT
Prior to this, we only considered a full sort on the cheapest input path and uniquifying any path which was already sorted in the required sort order. Here we adjust create_final_distinct_paths() so that it also adds an Incremental Sort path on any path which has presorted keys. Additionally, this adjusts the parallel distinct code so that we now consider sorting the cheapest partial path and incrementally sorting any partial paths with presorted keys. Previously we didn't consider any sorting for parallel distinct and only added a unique path atop any path which had the required pathkeys already. Author: David Rowley Reviewed-by: Richard Guo Discussion: https://postgr.es/m/CAApHDvo8Lz2H=42urBbfP65LTcEUOh288MT7DsG2_EWtW1AXHQ@mail.gmail.com
Diffstat (limited to 'src/backend/access/transam')
0 files changed, 0 insertions, 0 deletions