forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb5415e3
committed
Support parameterized TidPaths.
Up to now we've not worried much about joins where the join key is arelation's CTID column, reasoning that storing a table's CTIDs in someother table would be pretty useless. However, there are use-cases forthis sort of query involving self-joins, so that argument doesn't reallyhold water.This patch allows generating plans for joins on CTID that use a nestloopwith inner TidScan, similar to what we might do with an index on the joincolumn. This is the most efficient way to join when the outer side ofthe nestloop is expected to yield relatively few rows.This change requires upgrading tidpath.c and the generated TidPathsto work with RestrictInfos instead of bare qual clauses, but that'slong-postponed technical debt anyway.Discussion:https://postgr.es/m/17443.1545435266@sss.pgh.pa.us1 parent6f19a8c commitb5415e3
File tree
8 files changed
+415
-140
lines changed- src
- backend/optimizer
- path
- plan
- util
- include/nodes
- test/regress
- expected
- sql
8 files changed
+415
-140
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1202 | 1202 |
| |
1203 | 1203 |
| |
1204 | 1204 |
| |
1205 |
| - | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
1206 | 1209 |
| |
1207 | 1210 |
| |
1208 |
| - | |
| 1211 | + | |
1209 | 1212 |
| |
1210 | 1213 |
| |
1211 | 1214 |
| |
1212 | 1215 |
| |
1213 |
| - | |
| 1216 | + | |
1214 | 1217 |
| |
1215 | 1218 |
| |
1216 | 1219 |
| |
|
0 commit comments
Comments
(0)