costs_tweaks.diff
text/x-diff
Filename: costs_tweaks.diff
Type: text/x-diff
Part: 0
Patch
Format: unified
| File | + | − |
|---|---|---|
| contrib/postgres_fdw/sql/postgres_fdw.sql | 6 | 0 |
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 42735ae78a9..5eb387ef14f 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -1355,6 +1355,9 @@ INSERT INTO ft2 (c1,c2,c3) EXPLAIN (verbose, costs off) UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *; -- can't be pushed down UPDATE ft2 SET c3 = 'bar' WHERE postgres_fdw_abs(c1) > 2000 RETURNING *; +ALTER SERVER loopback OPTIONS (add fdw_startup_cost '10000.0'); +ALTER SERVER loopback OPTIONS (add fdw_tuple_cost '1.0'); +SET enable_nestloop TO false; EXPLAIN (verbose, costs off) UPDATE ft2 SET c3 = 'baz' FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) @@ -1364,6 +1367,9 @@ UPDATE ft2 SET c3 = 'baz' FROM ft4 INNER JOIN ft5 ON (ft4.c1 = ft5.c1) WHERE ft2.c1 > 2000 AND ft2.c2 === ft4.c1 RETURNING ft2.*, ft4.*, ft5.*; +RESET enable_nestloop; +ALTER SERVER loopback OPTIONS (drop fdw_startup_cost); +ALTER SERVER loopback OPTIONS (drop fdw_tuple_cost); EXPLAIN (verbose, costs off) DELETE FROM ft2 USING ft4 INNER JOIN ft5 ON (ft4.c1 === ft5.c1)