• Juan Merideño 4
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I am trying to improve the query performance as much as possible by getting all the data in just one query. When I try to get related records, if there are more than 100 records, the system returns from next error:

"Aggregate query has too many rows for direct assignment, use FOR loop"

The query works, but we can not iterate the elements nor even get the amount of elements returned in the sub-query.

There is no documentation talking about that limit. And it is really easy to surpass it, so I can never guarantee that any query is going to work always.

I would like to know if there is any workaround to avoid this error.
I am trying to improve the query performance as much as possible by getting all the data in just one query. When I try to get related records, if there are more than 100 records, the system returns from next error:

"Aggregate query has too many rows for direct assignment, use FOR loop"

The query works, but we can not iterate the elements nor even get the amount of elements returned in the sub-query.

There is no documentation talking about that limit. And it is really easy to surpass it, so I can never guarantee that any query is going to work always.

I would like to know if there is any workaround to avoid this error.