HI Thank you for updating the patch. > > One concern I had is the planning memory/time for nested joins. I may be > missing something, but it seems that each node can copy and scan all > accumulated descendant quals, potentially resulting in quadratic behavior. > In my 160-join test, planning memory increased from 2.6 MB on master to 58 > MB with v2, even though no conversion was possible. > > Would it make sense, at minimum, to test the RHS first? > > if (under_not && > (!query_outputs_are_not_nullable(subselect) || > !sublink_testexpr_is_not_nullable(root, sublink, sqinfo))) > return NULL; > > That would avoid unnecessary outer-side analysis when conversion is > already impossible. However, unless I am overlooking something, the > underlying quadratic behavior may still remain when conversions succeed. >
Thanks
