From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Vitaly Baranovsky <barvetalforums@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: PostgreSQL optimizer use seq scan instead of pkey index only scan (in queries with postgres_fdw)
Date: Mon, 06 May 2019 11:53:19 -0400
Message-ID: <16478.1557157999@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMkU=1xTHcVOpSZU2zbdUv32xwhNOdurQ5tjO9=GXPLmGheGew@mail.gmail.com>
References: <CALWbrdE9pw4+sQjOpa_VFWfLX+A4-kjUrtYEWzxZ7jcX-emRLA@mail.gmail.com>
<CAMkU=1xTHcVOpSZU2zbdUv32xwhNOdurQ5tjO9=GXPLmGheGew@mail.gmail.com>
Jeff Janes <jeff.janes@gmail.com> writes:
> It works the way you want in version 12, which is currently under
> development and should be released in 5 months or so.
Even in older versions, the OP would get a significantly smarter
plan after setting use_remote_estimate = on. I think the core
issue here is that we won't generate remote parameterized paths
without that:
/*
* If we're not using remote estimates, stop here. We have no way to
* estimate whether any join clauses would be worth sending across, so
* don't bother building parameterized paths.
*/
if (!fpinfo->use_remote_estimate)
return;
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeff.janes@gmail.com, barvetalforums@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: PostgreSQL optimizer use seq scan instead of pkey index only scan (in queries with postgres_fdw)
In-Reply-To: <16478.1557157999@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox