forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitde97072
committed
Allow merge and hash joins to occur on arbitrary expressions (anything not
containing a volatile function), rather than only on 'Var = Var' clausesas before. This makes it practical to do flatten_join_alias_vars at thestart of planning, which in turn eliminates a bunch of klugery inside theplanner to deal with alias vars. As a free side effect, we now detectimplied equality of non-Var expressions; for example inSELECT ... WHERE a.x = b.y and b.y = 42we will deduce a.x = 42 and use that as a restriction qual on a. Also,we can remove the restriction introduced 12/5/02 to prevent pullup ofsubqueries whose targetlists contain sublinks.Still TODO: make statistical estimation routines in selfuncs.c and costsize.csmarter about expressions that are more complex than plain Vars. The needfor this is considerably greater now that we have to be able to estimatethe suitability of merge and hash join techniques on such expressions.1 parent0eed62f commitde97072
File tree
32 files changed
+520
-659
lines changed- doc/src/sgml
- src
- backend
- nodes
- optimizer
- path
- plan
- prep
- util
- utils
- adt
- cache
- include
- nodes
- optimizer
- utils
- test/regress
- expected
- sql
32 files changed
+520
-659
lines changedLines changed: 30 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 |
| - | |
| 2 | + | |
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
| |||
375 | 375 |
| |
376 | 376 |
| |
377 | 377 |
| |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
378 | 399 |
| |
379 | 400 |
| |
380 | 401 |
| |
| |||
472 | 493 |
| |
473 | 494 |
| |
474 | 495 |
| |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
475 | 504 |
| |
476 | 505 |
| |
477 | 506 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 |
| - | |
| 18 | + | |
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
1059 | 1059 |
| |
1060 | 1060 |
| |
1061 | 1061 |
| |
| 1062 | + | |
| 1063 | + | |
1062 | 1064 |
| |
1063 | 1065 |
| |
1064 | 1066 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + | |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| |||
464 | 464 |
| |
465 | 465 |
| |
466 | 466 |
| |
467 |
| - | |
468 |
| - | |
469 |
| - | |
470 |
| - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
471 | 471 |
| |
472 | 472 |
| |
473 | 473 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
952 | 952 |
| |
953 | 953 |
| |
954 | 954 |
| |
| 955 | + | |
| 956 | + | |
955 | 957 |
| |
956 | 958 |
| |
957 | 959 |
| |
|
Lines changed: 3 additions & 3 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 |
| |
| |||
370 | 370 |
| |
371 | 371 |
| |
372 | 372 |
| |
373 |
| - | |
| 373 | + | |
374 | 374 |
| |
375 | 375 |
| |
376 |
| - | |
| 376 | + | |
377 | 377 |
| |
378 | 378 |
| |
379 | 379 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
251 | 251 |
| |
252 | 252 |
| |
253 | 253 |
| |
254 |
| - | |
255 |
| - | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
256 | 258 |
| |
257 | 259 |
| |
258 | 260 |
| |
|
Lines changed: 3 additions & 3 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 |
| |
| |||
266 | 266 |
| |
267 | 267 |
| |
268 | 268 |
| |
269 |
| - | |
| 269 | + | |
270 | 270 |
| |
271 | 271 |
| |
272 | 272 |
| |
273 | 273 |
| |
274 |
| - | |
| 274 | + | |
275 | 275 |
| |
276 | 276 |
| |
277 | 277 |
| |
|
Lines changed: 10 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
42 | 42 |
| |
43 | 43 |
| |
44 | 44 |
| |
45 |
| - | |
| 45 | + | |
46 | 46 |
| |
47 | 47 |
| |
48 | 48 |
| |
| |||
752 | 752 |
| |
753 | 753 |
| |
754 | 754 |
| |
755 |
| - | |
756 | 755 |
| |
757 | 756 |
| |
758 | 757 |
| |
| |||
779 | 778 |
| |
780 | 779 |
| |
781 | 780 |
| |
782 |
| - | |
783 |
| - | |
784 |
| - | |
| 781 | + | |
785 | 782 |
| |
786 | 783 |
| |
787 | 784 |
| |
| |||
935 | 932 |
| |
936 | 933 |
| |
937 | 934 |
| |
938 |
| - | |
939 |
| - | |
940 | 935 |
| |
941 | 936 |
| |
942 | 937 |
| |
943 |
| - | |
944 |
| - | |
945 |
| - | |
946 | 938 |
| |
947 | 939 |
| |
948 | 940 |
| |
| |||
952 | 944 |
| |
953 | 945 |
| |
954 | 946 |
| |
955 |
| - | |
| 947 | + | |
956 | 948 |
| |
957 | 949 |
| |
958 | 950 |
| |
959 | 951 |
| |
960 | 952 |
| |
961 | 953 |
| |
962 |
| - | |
| 954 | + | |
| 955 | + | |
963 | 956 |
| |
964 | 957 |
| |
965 | 958 |
| |
966 | 959 |
| |
967 | 960 |
| |
968 | 961 |
| |
969 |
| - | |
| 962 | + | |
| 963 | + | |
970 | 964 |
| |
971 | 965 |
| |
972 | 966 |
| |
973 | 967 |
| |
974 | 968 |
| |
975 |
| - | |
| 969 | + | |
| 970 | + | |
976 | 971 |
| |
977 | 972 |
| |
978 | 973 |
| |
| |||
1088 | 1083 |
| |
1089 | 1084 |
| |
1090 | 1085 |
| |
1091 |
| - | |
| 1086 | + | |
1092 | 1087 |
| |
1093 | 1088 |
| |
1094 | 1089 |
| |
|
0 commit comments
Comments
(0)