On 04/04/14 17:14, Kohler Manuel (ID SIS) wrote:
> Here is the same query with fdw:
>
> db=# EXPLAIN VERBOSE select ds.code, count(*), sum(dsf.size_in_bytes) as
> "raw_size",pg_size_pretty(sum(dsf.size_in_bytes)) as "size" from
> data_set_files_fdw dsf, data_sets_fdw ds where dsf.parent_id is nu
"Kohler Manuel (ID SIS)" writes:
> here are the Query plans. The first plan is on the source database directly.
> So no fdw involved:
Do you have use_remote_estimate enabled? The rowcount estimates for the
foreign tables seem pretty far from reality; use_remote_estimates should
help.
Hi,
here are the Query plans. The first plan is on the source database directly. So
no fdw involved:
source_db=# EXPLAIN ANALYZE select ds.code, count(*), sum(dsf.size_in_bytes) as
"raw_size",pg_size_pretty(sum(dsf.size_in_bytes)) as "size" from data_set_files
dsf, data_sets ds where dsf.parent
Kohler Manuel wrote:
> I have a question regarding the use of indices when querying foreign data
> tables (using postgres_fdw
> of 9.3 to another postgres DB).
> Everything works fine beside the fact that the indices which are defined in
> the foreign DB are not
> used at all when I do query it t