Add EstimateCost() API to FdwRoutine, which is used to estimate
authorShigeru Hanada <[email protected]>
Tue, 5 Oct 2010 08:03:28 +0000 (17:03 +0900)
committerShigeru Hanada <[email protected]>
Tue, 5 Oct 2010 08:03:28 +0000 (17:03 +0900)
commit0c27c0536f15e46d939aecbeb0e5ca568b7d6730
treed23c3f4d0d31a07c3f1ffda301b4d08dacb438ba
parent0d8f5a53594a00edea7d82efbd87253b1086df8b
Add EstimateCost() API to FdwRoutine, which is used to estimate
the costs of a ForeignScan.

Also implement pgEstimateCost() for postgresql_fdw, which estimate
the costs as sum of:
  * costs of sequencial scan
  * connection cost (if connection_cost was set in the server generic
    option)
  * transfer cost (if transfer_cost, cost-per-width, was set in the
    server generic option)
13 files changed:
contrib/dblink/dblink.c
contrib/dblink/expected/dblink.out
contrib/dblink/sql/dblink.sql
contrib/postgresql_fdw/expected/postgresql_fdw.out
contrib/postgresql_fdw/postgresql_fdw.c
contrib/postgresql_fdw/sql/postgresql_fdw.sql
src/backend/foreign/foreign.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/util/plancat.c
src/include/foreign/foreign.h
src/include/nodes/execnodes.h
src/test/regress/expected/foreign_data.out