Re: PostgreSQL optimizer use seq scan instead of pkey index only scan (in queries with postgres_fdw)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Janes <jeff.janes@xxxxxxxxx> 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





[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux