postgres/contrib/postgres_fdw
David Rowley cac169d686 Increase DEFAULT_FDW_TUPLE_COST from 0.01 to 0.2
0.01 was unrealistically low as it's the same as the default
cpu_tuple_cost and 10x cheaper than the default parallel_tuple_cost.
It's hard to imagine a situation where fetching a tuple from a foreign
server would be cheaper than fetching one from a parallel worker.

After some experimentation on a loopback server, somewhere between 0.15
and 0.3 seems more realistic.  Here we split the difference and set it
to 0.2.

This will cause operations that reduce the number of tuples (e.g.
aggregation) to be more likely to take place on the foreign server.

Adjusting this causes some plan changes in the postgres_fdw regression
tests.  This is because penalizing each Path with the additional tuple
costs causes some dilution of the costs of the other operations being
charged for and results in various paths appearing to be closer to the
same costs such that add_path's STD_FUZZ_FACTOR is more likely to see two
paths as costing (fuzzily) the same.  This isn't ideal, but it shouldn't
be reason enough to use artificially low costs.

Discussion: https://postgr.es/m/CAApHDvopVjjfh5c1Ed2HRvDdfom2dEpMwwiu5-f1AnmYprJngA@mail.gmail.com
2023-11-02 14:30:15 +13:00
..
expected Increase DEFAULT_FDW_TUPLE_COST from 0.01 to 0.2 2023-11-02 14:30:15 +13:00
sql postgres_fdw: Fix test for parameterized foreign scan. 2023-08-30 17:15:00 +09:00
.gitignore
connection.c postgres_fdw: Replace WAIT_EVENT_EXTENSION with custom wait events 2023-10-05 09:50:42 +09:00
deparse.c Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
Makefile postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
meson.build Update copyright for 2023 2023-01-02 15:00:37 -05:00
option.c Expand some more uses of "deleg" to "delegation" or "delegated". 2023-05-21 10:55:18 -04:00
postgres_fdw--1.0--1.1.sql postgres_fdw: Add functions to discard cached connections. 2021-01-26 15:35:54 +09:00
postgres_fdw--1.0.sql
postgres_fdw.c Increase DEFAULT_FDW_TUPLE_COST from 0.01 to 0.2 2023-11-02 14:30:15 +13:00
postgres_fdw.control postgres_fdw: Add function to list cached connections to foreign servers. 2021-01-18 15:11:08 +09:00
postgres_fdw.h Add trailing commas to enum definitions 2023-10-26 09:20:54 +02:00
shippable.c Pre-beta mechanical code beautification. 2023-05-19 17:24:48 -04:00