Use joins instead of includes and select