sje_tablesample.patch
application/octet-stream
Filename: sje_tablesample.patch
Type: application/octet-stream
Part: 0
Message:
Re: Removing unneeded self joins
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
| File | + | − |
|---|---|---|
| src/backend/optimizer/plan/analyzejoins.c | 4 | 0 |
diff --git a/src/backend/optimizer/plan/analyzejoins.c b/src/backend/optimizer/plan/analyzejoins.c index 506fccd20c9..fe3c9bc9b72 100644 --- a/src/backend/optimizer/plan/analyzejoins.c +++ b/src/backend/optimizer/plan/analyzejoins.c @@ -2148,6 +2148,10 @@ remove_self_joins_one_group(PlannerInfo *root, Relids relids) Assert(root->simple_rte_array[k]->relid == root->simple_rte_array[r]->relid); + if (root->simple_rte_array[k]->tablesample || + root->simple_rte_array[r]->tablesample) + continue; + /* * It is impossible to eliminate join of two relations if they * belong to different rules of order. Otherwise planner can't be