Re: neqjoinsel versus "refresh materialized view concurrently" - Mailing list pgsql-hackers

From Tom Lane
Subject Re: neqjoinsel versus "refresh materialized view concurrently"
Date
Msg-id 8820.1520982832@sss.pgh.pa.us
Whole thread Raw
In response to Re: neqjoinsel versus "refresh materialized view concurrently"  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> This looks like an invisible correlation problem.

Yeah --- the planner has no idea that the join rows satisfying
newdata.* *= newdata2.* are likely to be exactly the ones not
satisfying newdata.ctid <> newdata2.ctid.  It's very accidental
that we got a good plan before.

I've not looked to see where this query is generated, but I wonder
if we could make things better by dropping the LIMIT 1 and instead
using an executor count parameter to stop early.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: SQL/JSON: functions
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] path toward faster partition pruning