- Notifications
You must be signed in to change notification settings - Fork5
Commit835bb97
committed
Restructure building of join relation targetlists so that a join plan
node emits only those vars that are actually needed above it in theplan tree. (There were comments in the code suggesting that this wasdone at some point in the dim past, but for a long time we have justmade join nodes emit everything that either input emitted.) Aside frombeing marginally more efficient, this fixes the problem noted by PeterEisentraut where a join above an IN-implemented-as-join might fail,because the subplan targetlist constructed in the latter case didn'tmeet the expectation of including everything.Along the way, fix some places that were O(N^2) in the targetlistlength. This is not all the trouble spots for wide queries by anymeans, but it's a step forward.1 parentcf883ea commit835bb97
File tree
16 files changed
+333
-220
lines changed- src
- backend
- nodes
- optimizer
- path
- plan
- prep
- util
- include
- nodes
- optimizer
16 files changed
+333
-220
lines changedLines changed: 31 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
17 |
| - | |
| 17 | + | |
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
| |||
388 | 388 |
| |
389 | 389 |
| |
390 | 390 |
| |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
391 | 421 |
| |
392 | 422 |
| |
393 | 423 |
| |
|
Lines changed: 29 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
235 | 235 |
| |
236 | 236 |
| |
237 | 237 |
| |
| 238 | + | |
| 239 | + | |
| 240 | + | |
238 | 241 |
| |
239 | 242 |
| |
240 | 243 |
| |
| |||
251 | 254 |
| |
252 | 255 |
| |
253 | 256 |
| |
254 |
| - | |
| 257 | + | |
| 258 | + | |
255 | 259 |
| |
256 |
| - | |
257 |
| - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
258 | 263 |
| |
259 | 264 |
| |
260 | 265 |
| |
261 | 266 |
| |
| 267 | + | |
| 268 | + | |
262 | 269 |
| |
263 | 270 |
| |
264 | 271 |
| |
265 | 272 |
| |
266 | 273 |
| |
267 | 274 |
| |
268 |
| - | |
269 | 275 |
| |
270 | 276 |
| |
271 | 277 |
| |
| |||
274 | 280 |
| |
275 | 281 |
| |
276 | 282 |
| |
277 |
| - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
278 | 288 |
| |
279 | 289 |
| |
280 | 290 |
| |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
281 | 304 |
| |
282 | 305 |
| |
283 | 306 |
| |
|
Lines changed: 31 additions & 29 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
49 | 49 |
| |
50 | 50 |
| |
51 | 51 |
| |
52 |
| - | |
| 52 | + | |
53 | 53 |
| |
54 | 54 |
| |
55 | 55 |
| |
| |||
1792 | 1792 |
| |
1793 | 1793 |
| |
1794 | 1794 |
| |
1795 |
| - | |
1796 |
| - | |
1797 |
| - | |
1798 |
| - | |
1799 |
| - | |
| 1795 | + | |
| 1796 | + | |
1800 | 1797 |
| |
1801 |
| - | |
1802 | 1798 |
| |
1803 | 1799 |
| |
1804 | 1800 |
| |
| |||
1858 | 1854 |
| |
1859 | 1855 |
| |
1860 | 1856 |
| |
1861 |
| - | |
| 1857 | + | |
1862 | 1858 |
| |
1863 |
| - | |
| 1859 | + | |
1864 | 1860 |
| |
1865 | 1861 |
| |
1866 | 1862 |
| |
1867 | 1863 |
| |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
1868 | 1867 |
| |
1869 | 1868 |
| |
1870 | 1869 |
| |
1871 | 1870 |
| |
1872 | 1871 |
| |
1873 | 1872 |
| |
1874 | 1873 |
| |
1875 |
| - | |
| 1874 | + | |
1876 | 1875 |
| |
1877 |
| - | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
1878 | 1879 |
| |
1879 | 1880 |
| |
1880 |
| - | |
1881 |
| - | |
1882 |
| - | |
1883 |
| - | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
| 1884 | + | |
1884 | 1885 |
| |
1885 |
| - | |
1886 |
| - | |
| 1886 | + | |
| 1887 | + | |
| 1888 | + | |
1887 | 1889 |
| |
1888 |
| - | |
1889 |
| - | |
| 1890 | + | |
| 1891 | + | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
1890 | 1895 |
| |
1891 |
| - | |
1892 |
| - | |
1893 |
| - | |
1894 |
| - | |
1895 |
| - | |
1896 |
| - | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
1897 | 1899 |
| |
1898 | 1900 |
| |
1899 | 1901 |
| |
1900 | 1902 |
| |
1901 |
| - | |
1902 |
| - | |
| 1903 | + | |
| 1904 | + | |
1903 | 1905 |
| |
1904 |
| - | |
1905 |
| - | |
| 1906 | + | |
1906 | 1907 |
| |
| 1908 | + | |
1907 | 1909 |
| |
1908 | 1910 |
| |
1909 | 1911 |
| |
|
Lines changed: 7 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
703 | 703 |
| |
704 | 704 |
| |
705 | 705 |
| |
706 |
| - | |
| 706 | + | |
707 | 707 |
| |
708 |
| - | |
| 708 | + | |
709 | 709 |
| |
710 |
| - | |
711 |
| - | |
712 |
| - | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
713 | 713 |
| |
714 | 714 |
| |
715 | 715 |
| |
716 |
| - | |
717 | 716 |
| |
718 |
| - | |
719 |
| - | |
| 717 | + | |
720 | 718 |
| |
721 | 719 |
| |
722 | 720 |
| |
|
0 commit comments
Comments
(0)