Optimize EF Core query with Include()
问题 I have following query within my project and it is consuming lot of time to execute. I am trying to optimize it, but not able to successfully do it. Any suggestions would be highly appreciated. _context.MainTable .Include(mt => mt.ChildTable1) .Include(mt => mt.ChildTable1.ChildTable2) .Include(mt => mt.ChildTable3) .Include(mt => mt.ChildTable3.ChildTable4) .SingleOrDefault( mt => mt.ChildTable3.ChildTable4.Id == id && mt.ChildTable1.Operation == operation && mt.ChildTable1.Method = method &