It is difficult to reuse this approach for SJ-Materialization, because SJ-Materialization creates temp.table after join optimization has been finished. At that point, it is not easy to go back and redo the join optimization.
A better option would be to make subquery_types_allow_materialization() do its job properly and detect all cases where materialization is not applicable.
It is difficult to reuse this approach for SJ-Materialization, because SJ-Materialization creates temp.table after join optimization has been finished. At that point, it is not easy to go back and redo the join optimization.
A better option would be to make subquery_ types_allow_ materialization () do its job properly and detect all cases where materialization is not applicable.