1. Add skip-merge optimization for joins; 2. Avoid re-applying optimize() on join queries