I have a query like this
return await _ctx.Activities
.Include(a => a.Attributes)
.Include(a => a.Roles)
.Include(a
This query is bound to run slow as when parsing this to SQL will create very complex queries with all columns selected from all tables. Best thing for optimizing performance when working with these queries is to break into multiple queries and using select to select only those columns that are required.