forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit77387f0
committed
Suppress creation of backwardly-indexed paths for LATERAL join clauses.
Given a query such asSELECT * FROM foo JOIN LATERAL (SELECT foo.var1) ss(x) ON ss.x = foo.var2the existence of the join clause "ss.x = foo.var2" encourages indxpath.c tobuild a parameterized path for foo using any index available for foo.var2.This is completely useless activity, though, since foo has got to be on theoutside not the inside of any nestloop join with ss. It's reasonablyinexpensive to add tests that prevent creation of such paths, so let's dothat.1 parent35738b5 commit77387f0
File tree
3 files changed
+46
-8
lines changed- src
- backend/optimizer/path
- include/optimizer
3 files changed
+46
-8
lines changedLines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1969 | 1969 |
| |
1970 | 1970 |
| |
1971 | 1971 |
| |
| 1972 | + | |
| 1973 | + | |
| 1974 | + | |
1972 | 1975 |
| |
1973 | 1976 |
| |
1974 | 1977 |
| |
1975 | 1978 |
| |
1976 |
| - | |
| 1979 | + | |
| 1980 | + | |
1977 | 1981 |
| |
1978 | 1982 |
| |
1979 | 1983 |
| |
| |||
2050 | 2054 |
| |
2051 | 2055 |
| |
2052 | 2056 |
| |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
2053 | 2061 |
| |
2054 | 2062 |
| |
2055 | 2063 |
| |
|
Lines changed: 35 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
121 | 121 |
| |
122 | 122 |
| |
123 | 123 |
| |
| 124 | + | |
124 | 125 |
| |
125 | 126 |
| |
126 | 127 |
| |
127 | 128 |
| |
| 129 | + | |
128 | 130 |
| |
129 | 131 |
| |
130 | 132 |
| |
| |||
211 | 213 |
| |
212 | 214 |
| |
213 | 215 |
| |
| 216 | + | |
214 | 217 |
| |
215 | 218 |
| |
216 | 219 |
| |
217 |
| - | |
| 220 | + | |
218 | 221 |
| |
219 | 222 |
| |
220 | 223 |
| |
221 | 224 |
| |
222 | 225 |
| |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
223 | 243 |
| |
224 | 244 |
| |
225 | 245 |
| |
226 | 246 |
| |
227 |
| - | |
| 247 | + | |
228 | 248 |
| |
229 |
| - | |
| 249 | + | |
230 | 250 |
| |
231 | 251 |
| |
232 | 252 |
| |
| |||
260 | 280 |
| |
261 | 281 |
| |
262 | 282 |
| |
263 |
| - | |
| 283 | + | |
264 | 284 |
| |
265 | 285 |
| |
266 | 286 |
| |
267 | 287 |
| |
268 | 288 |
| |
269 | 289 |
| |
270 | 290 |
| |
271 |
| - | |
| 291 | + | |
| 292 | + | |
272 | 293 |
| |
273 | 294 |
| |
274 | 295 |
| |
| |||
1796 | 1817 |
| |
1797 | 1818 |
| |
1798 | 1819 |
| |
| 1820 | + | |
1799 | 1821 |
| |
1800 | 1822 |
| |
1801 | 1823 |
| |
| |||
1810 | 1832 |
| |
1811 | 1833 |
| |
1812 | 1834 |
| |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
1813 | 1839 |
| |
1814 | 1840 |
| |
1815 | 1841 |
| |
| |||
1825 | 1851 |
| |
1826 | 1852 |
| |
1827 | 1853 |
| |
| 1854 | + | |
1828 | 1855 |
| |
1829 | 1856 |
| |
1830 | 1857 |
| |
| |||
1837 | 1864 |
| |
1838 | 1865 |
| |
1839 | 1866 |
| |
| 1867 | + | |
1840 | 1868 |
| |
1841 | 1869 |
| |
1842 |
| - | |
| 1870 | + | |
| 1871 | + | |
1843 | 1872 |
| |
1844 | 1873 |
| |
1845 | 1874 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
130 |
| - | |
| 130 | + | |
| 131 | + | |
131 | 132 |
| |
132 | 133 |
| |
133 | 134 |
| |
|
0 commit comments
Comments
(0)