Re: Cost overestimation of foreign JOIN

2020-12-02 Thread Andrey V. Lepikhov
On 12/1/20 6:17 PM, Ashutosh Bapat wrote: On Mon, Nov 30, 2020 at 11:56 PM Andrey Lepikhov wrote: On 30.11.2020 22:38, Tom Lane wrote: Andrey Lepikhov writes: If you're unhappy with the planning results you get for this, why don't you have use_remote_estimate turned on? I have a mixed load

Re: Cost overestimation of foreign JOIN

2020-12-01 Thread Ashutosh Bapat
On Mon, Nov 30, 2020 at 11:56 PM Andrey Lepikhov wrote: > > On 30.11.2020 22:38, Tom Lane wrote: > > Andrey Lepikhov writes: > >> Maybe it is needed to swap lines 2908 and 2909 (see attachment)? > > > > No; as explained in the comment immediately above here, we're assuming > > that the join condi

Re: Cost overestimation of foreign JOIN

2020-11-30 Thread Andrey Lepikhov
On 30.11.2020 22:38, Tom Lane wrote: Andrey Lepikhov writes: Maybe it is needed to swap lines 2908 and 2909 (see attachment)? No; as explained in the comment immediately above here, we're assuming that the join conditions will be applied on the cross product of the input relations. Thank yo

Re: Cost overestimation of foreign JOIN

2020-11-30 Thread Tom Lane
Andrey Lepikhov writes: > Maybe it is needed to swap lines 2908 and 2909 (see attachment)? No; as explained in the comment immediately above here, we're assuming that the join conditions will be applied on the cross product of the input relations. Now admittedly, that's a worst-case assumption,