Enhancement
When the SQL is something like .... from t1, t2 where t1.a=t2.a and t2.b in (...) and the IN CLAUSE is rather big, we may consume a lot of memory to build the index ranges if we choose the index join and t1 is the driven table.
We need to record these memory usages and design a way to control its usage to avoid the possible OOM risk.