Re: surprisingly expensive join planning query - Mailing list pgsql-hackers

From Tom Lane
Subject Re: surprisingly expensive join planning query
Date
Msg-id 3228.1575227835@sss.pgh.pa.us
Whole thread Raw
In response to Re: surprisingly expensive join planning query  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: surprisingly expensive join planning query  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List pgsql-hackers
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> On Sun, Dec 01, 2019 at 01:27:04PM -0500, Tom Lane wrote:
>> Alternatively, it'd be possible to get rid of the separate List
>> altogether, and just add the rinfo's to "mergeclauses" immediately.
>> The functionality of the separate list could be replaced by a
>> bool variable remembering whether we found any matches in this
>> pass through the loop.  I think the code would be a little less
>> clear that way, but this report makes it clear that it's a
>> performance bottleneck, so maybe we should just change it.

> Yes, that might be an option. And it works even on 9.5 for me (per the
> attached patch). I don't think it's much less clear compared to just
> doing an explicit free at the end.

LGTM.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Using multiple extended statistics for estimates
Next
From: Tom Lane
Date:
Subject: Re: Bogus EXPLAIN results with column aliases for mismatched partitions