Optimize join when using partials