Re: Push down more full joins in postgres_fdw - Mailing list pgsql-hackers

From Etsuro Fujita
Subject Re: Push down more full joins in postgres_fdw
Date
Msg-id db43cf7c-224f-2041-4d04-ceeeda033f4f@lab.ntt.co.jp
Whole thread Raw
In response to Re: Push down more full joins in postgres_fdw  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
Responses Re: Push down more full joins in postgres_fdw  (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>)
List pgsql-hackers
On 2016/10/26 18:25, Ashutosh Bapat wrote:

> Your patch calls isSubqueryExpr() recursively for every Var in the
> targetlist, which can be many for foreign tables with many columns.
> For every such Var it may need to reach upto the relation which is
> converted into subquery, which can as bad as reaching every base
> relation. So, it looks like the number of recursive calls to
> isSubqueryExpr() is bounded by V * N (i.e. worst case depth of the
> RelOptInfo tree), which can be quite costly. If use_remote_estimates
> is true, we do this for every intermediate relation and for every path
> created. That isn't very performance efficient.

In practice, the search cost would be negligible compared to the cost of 
explaining/executing the query.

My concern about your proposal is: it might not be worth complicating 
the code to solve a problem that is actually not a problem in practice.

Best regards,
Etsuro Fujita





pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: Declarative partitioning - another take
Next
From: Amit Kapila
Date:
Subject: Re: Declarative partitioning - another take