diff options
Diffstat (limited to 'src/backend/optimizer')
-rw-r--r-- | src/backend/optimizer/path/allpaths.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c index 09a0ee24d60..fa2cf61329c 100644 --- a/src/backend/optimizer/path/allpaths.c +++ b/src/backend/optimizer/path/allpaths.c @@ -2840,7 +2840,8 @@ generate_useful_gather_paths(PlannerInfo *root, RelOptInfo *rel, bool override_r cheapest_partial_path = linitial(rel->partial_pathlist); /* - * Consider incremental sort paths for each interesting ordering. + * Consider sorted paths for each interesting ordering. We generate both + * incremental and full sort. */ foreach(lc, useful_pathkeys_list) { @@ -2854,14 +2855,6 @@ generate_useful_gather_paths(PlannerInfo *root, RelOptInfo *rel, bool override_r Path *subpath = (Path *) lfirst(lc2); GatherMergePath *path; - /* - * If the path has no ordering at all, then we can't use either - * incremental sort or rely on implict sorting with a gather - * merge. - */ - if (subpath->pathkeys == NIL) - continue; - is_sorted = pathkeys_count_contained_in(useful_pathkeys, subpath->pathkeys, &presorted_keys); |