forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb592422
committed
Relax overly strict rules in select_outer_pathkeys_for_merge()
The select_outer_pathkeys_for_merge function made an attempt to build themerge join pathkeys in the same order as query_pathkeys. This was done asit may have led to no sort being required for an ORDER BY or GROUP BYclause in the upper planner. However, this restriction seems overlystrict as it required that we match the query_pathkeys entirely or wedon't bother putting the merge join pathkeys in that order.Here we relax this rule so that we use a prefix of the query_pathkeysproviding that prefix matches all of the join quals. This may provide theupper planner with partially sorted input which will allow the use ofincremental sorts instead of full sorts.Author: David RowleyReviewed-by: Richard GuoDiscussion:https://postgr.es/m/CAApHDvrtZu0PHVfDPFM4Yx3jNR2Wuwosv+T2zqa7LrhhBr2rRg@mail.gmail.com1 parent2865b40 commitb592422
File tree
3 files changed
+82
-7
lines changed- src
- backend/optimizer/path
- test/regress
- expected
- sql
3 files changed
+82
-7
lines changedLines changed: 33 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1890 | 1890 |
| |
1891 | 1891 |
| |
1892 | 1892 |
| |
1893 |
| - | |
1894 |
| - | |
1895 |
| - | |
1896 |
| - | |
1897 |
| - | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
1898 | 1900 |
| |
1899 | 1901 |
| |
1900 | 1902 |
| |
| |||
1964 | 1966 |
| |
1965 | 1967 |
| |
1966 | 1968 |
| |
1967 |
| - | |
1968 |
| - | |
| 1969 | + | |
| 1970 | + | |
| 1971 | + | |
| 1972 | + | |
| 1973 | + | |
1969 | 1974 |
| |
1970 | 1975 |
| |
1971 | 1976 |
| |
| 1977 | + | |
| 1978 | + | |
1972 | 1979 |
| |
1973 | 1980 |
| |
1974 | 1981 |
| |
| |||
1981 | 1988 |
| |
1982 | 1989 |
| |
1983 | 1990 |
| |
| 1991 | + | |
| 1992 | + | |
1984 | 1993 |
| |
1985 | 1994 |
| |
1986 | 1995 |
| |
| |||
2003 | 2012 |
| |
2004 | 2013 |
| |
2005 | 2014 |
| |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
2006 | 2032 |
| |
2007 | 2033 |
| |
2008 | 2034 |
| |
|
Lines changed: 31 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2437 | 2437 |
| |
2438 | 2438 |
| |
2439 | 2439 |
| |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
| 2451 | + | |
| 2452 | + | |
| 2453 | + | |
| 2454 | + | |
| 2455 | + | |
| 2456 | + | |
| 2457 | + | |
| 2458 | + | |
| 2459 | + | |
| 2460 | + | |
| 2461 | + | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
| 2468 | + | |
| 2469 | + | |
| 2470 | + | |
2440 | 2471 |
| |
2441 | 2472 |
| |
2442 | 2473 |
| |
|
Lines changed: 18 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
472 | 472 |
| |
473 | 473 |
| |
474 | 474 |
| |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
475 | 493 |
| |
476 | 494 |
| |
477 | 495 |
| |
|
0 commit comments
Comments
(0)