Testing N+1 query solution