forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbc397e5
committed
De-dupicate Memoize cache keys
It was possible when determining the cache keys for a Memoize path thatif the same expr appeared twice in the parameterized path's ppi_clausesand/or in the Nested Loop's inner relation's lateral_vars. If thishappened the Memoize node's cache keys would contain duplicates. Thisisn't a problem for correctness, all it means is that the cache lookupswill be suboptimal due to having redundant work to do on every hash tablelookup and insert.Here we adjust paraminfo_get_equal_hashops() to look for duplicates andignore them when we find them.Author: David RowleyReviewed-by: Richard GuoDiscussion:https://postgr.es/m/422277.1706207562%40sss.pgh.pa.us1 parentbd5760d commitbc397e5
File tree
2 files changed
+21
-5
lines changed- src
- backend/optimizer/path
- test/regress/expected
2 files changed
+21
-5
lines changedLines changed: 20 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
492 | 492 |
| |
493 | 493 |
| |
494 | 494 |
| |
495 |
| - | |
496 |
| - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
497 | 505 |
| |
498 | 506 |
| |
499 | 507 |
| |
| |||
536 | 544 |
| |
537 | 545 |
| |
538 | 546 |
| |
539 |
| - | |
540 |
| - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
541 | 557 |
| |
542 | 558 |
| |
543 | 559 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
107 | 107 |
| |
108 | 108 |
| |
109 | 109 |
| |
110 |
| - | |
| 110 | + | |
111 | 111 |
| |
112 | 112 |
| |
113 | 113 |
| |
|
0 commit comments
Comments
(0)