forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7125687
committed
Fix cost estimates for EXISTS subqueries that are evaluated as initPlans
(because they are uncorrelated with the immediate parent query). We werecharging the full run cost to the parent node, disregarding the fact thatonly one row need be fetched for EXISTS. While this would only be acosmetic issue in most cases, it might possibly affect planning outcomesif the parent query were itself a subquery to some upper query.Per recent discussion with Steve Crawford.1 parent576b890 commit7125687
File tree
3 files changed
+49
-9
lines changed- src
- backend/optimizer
- path
- plan
- include/optimizer
3 files changed
+49
-9
lines changedLines changed: 42 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
54 | 54 |
| |
55 | 55 |
| |
56 | 56 |
| |
57 |
| - | |
| 57 | + | |
58 | 58 |
| |
59 | 59 |
| |
60 | 60 |
| |
| |||
2049 | 2049 |
| |
2050 | 2050 |
| |
2051 | 2051 |
| |
2052 |
| - | |
2053 |
| - | |
2054 |
| - | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
2055 | 2056 |
| |
2056 | 2057 |
| |
2057 | 2058 |
| |
| |||
2097 | 2098 |
| |
2098 | 2099 |
| |
2099 | 2100 |
| |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
2100 | 2138 |
| |
2101 | 2139 |
| |
2102 | 2140 |
| |
|
Lines changed: 5 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| 21 | + | |
21 | 22 |
| |
22 | 23 |
| |
23 | 24 |
| |
| |||
266 | 267 |
| |
267 | 268 |
| |
268 | 269 |
| |
269 |
| - | |
| 270 | + | |
270 | 271 |
| |
271 | 272 |
| |
272 | 273 |
| |
| |||
1021 | 1022 |
| |
1022 | 1023 |
| |
1023 | 1024 |
| |
1024 |
| - | |
| 1025 | + | |
1025 | 1026 |
| |
1026 | 1027 |
| |
1027 | 1028 |
| |
| |||
1041 | 1042 |
| |
1042 | 1043 |
| |
1043 | 1044 |
| |
1044 |
| - | |
| 1045 | + | |
1045 | 1046 |
| |
1046 | 1047 |
| |
1047 | 1048 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
92 | 92 |
| |
93 | 93 |
| |
94 | 94 |
| |
| 95 | + | |
95 | 96 |
| |
96 | 97 |
| |
97 | 98 |
| |
|
0 commit comments
Comments
(0)