Re: NOT IN subquery optimization - Mailing list pgsql-hackers

From Andrey Lepikhov
Subject Re: NOT IN subquery optimization
Date
Msg-id af3c2a22-013f-6d78-195a-3a923c4fa07d@postgrespro.ru
Whole thread Raw
In response to Re: NOT IN subquery optimization  ("Li, Zheng" <zhelli@amazon.com>)
List pgsql-hackers
You should do small rebase (conflict with 911e7020770) and pgindent of 
the patch to repair problems with long lines and backspaces.

I am reviewing your patch in small steps. Questions:
1. In the find_innerjoined_rels() routine you stop descending on 
JOIN_FULL node type. I think it is wrong because if var has NOT NULL 
constraint, full join can't change it to NULL.
2. The convert_NOT_IN_to_join() routine is ok, but its name is 
misleading. May be you can use something like make_NOT_IN_to_join_quals()?
3. pull_up_sublinks_qual_recurse(). Comment:
"Return pullout predicate (x is NOT NULL)..."
may be change to
"Return pullout predicate (x is NOT NULL or NOT EXISTS...)"?
4. is_node_nonnullable():
I think one more case of non-nullable var may be foreign key constraint.

-- 
Andrey Lepikhov
Postgres Professional
https://postgrespro.com
The Russian Postgres Company




pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: pg_stat_statements issue with parallel maintenance (Was Re: WALusage calculation patch)
Next
From: Noah Misch
Date:
Subject: Re: Autovacuum vs vac_update_datfrozenxid() vs ?