pgsql: Be more wary of missing statistics in eqjoinsel_semi(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Be more wary of missing statistics in eqjoinsel_semi().
Date
Msg-id E1Q9We2-0004Ki-R4@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Be more wary of missing statistics in eqjoinsel_semi().

In particular, if we don't have real ndistinct estimates for both sides,
fall back to assuming that half of the left-hand rows have join partners.
This is what was done in 8.2 and 8.3 (cf nulltestsel() in those versions).
It's pretty stupid but it won't lead us to think that an antijoin produces
no rows out, as seen in recent example from Uwe Schroeder.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3f5d2fe3029b181fe773a02f1d4b34624c357634

Modified Files
--------------
src/backend/utils/adt/selfuncs.c |   49 ++++++++++++++++++++++++-------------
1 files changed, 32 insertions(+), 17 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix RI_Initial_Check to use a COLLATE clause when needed in its
Next
From: Tom Lane
Date:
Subject: pgsql: Be more wary of missing statistics in eqjoinsel_semi().