query optimized using includes

#434