Re: planner missing a trick for foreign tables w/OR conditions

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Eric Ridge <e_ridge(at)tcdi(dot)com>
Subject: Re: planner missing a trick for foreign tables w/OR conditions
Date: 2013-12-17 18:34:09
Message-ID: CA+U5nMJPv1SsFcBHVFOm2pLJv1cBJFs=0gzVdg2kgXfiGQ1MdA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17 December 2013 17:28, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> So at this point I'm pretty much talked into it. We could eliminate the
> dependence on indexes entirely, and replace this code with a step that
> simply tries to pull single-base-relation quals out of ORs wherever it can
> find one. You could argue that the produced quals would sometimes not be
> worth testing for, but we could apply a heuristic that says to forget it
> unless the estimated selectivity of the extracted qual is less than,
> I dunno, 0.5 maybe. (I wonder if it'd be worth inserting a check that
> there's not already a manually-generated equivalent clause, too ...)

Sounds sensible.

What surprises me is we don't have an API that allows an FDW to decide
what it can accept or not. It seems strange to have a unilateral
decision by our planner about what another planner is capable of.
Should we extend the API to allow the question to be asked?

--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-12-17 18:42:08 Re: [bug fix] multibyte messages are displayed incorrectly on the client
Previous Message Stephen Frost 2013-12-17 18:32:38 Re: Extension Templates S03E11