Re: [PERFORM] 3000x Slower query when using Foreign Data Wrapper vs. local

2015-10-11 Thread Mohammad Habbab
> I am not sure why, by the way I think because you could have the local tables mixed with the foreign tables, so in that case, you have to use > the local cost base optimizer Oh right ! yep, that explains it. Thank you very much ! Best Regards, Mohammad On Sun, Oct 11, 2015 at 6:48 PM, desmodemo

Re: [PERFORM] 3000x Slower query when using Foreign Data Wrapper vs. local

2015-10-11 Thread desmodemone
2015-10-11 12:10 GMT+02:00 Mohammad Habbab : > Awesome ! Thank you very much, that solved it :) . But, do you have any > idea why this isn't enabled by default ? > As a first time user for FDW I would assume that usage of remote estimates > would be enabled by default because they would be more au

Re: [PERFORM] 3000x Slower query when using Foreign Data Wrapper vs. local

2015-10-11 Thread Mohammad Habbab
Awesome ! Thank you very much, that solved it :) . But, do you have any idea why this isn't enabled by default ? As a first time user for FDW I would assume that usage of remote estimates would be enabled by default because they would be more authoritative and more representative of access patterns

Re: [PERFORM] 3000x Slower query when using Foreign Data Wrapper vs. local

2015-10-11 Thread desmodemone
Hi Mohammad, I think it's not enable "use_remote_estimate" during the creation of the foreign table http://www.postgresql.org/docs/9.4/static/postgres-fdw.html use_remote_estimate This option, which can be specified for a foreign table or a foreign server, contro

[PERFORM] 3000x Slower query when using Foreign Data Wrapper vs. local

2015-10-11 Thread Mohammad Habbab
Hi there, If it's possible, I would really appreciate any hints or help on an issue I've been facing lately. I'm running two instance of Postgres locally: 9.4.4 (operational db) and 9.5beta1 (analytical db). I've already imported schema to analytical db and while doing the following query I find v