Avoid creating huge arrays for collectors when a query does not have an upper bound limit

Description

Instead of allocating such arrays, we could introduce an incremental allocation behind the hood.
E.g.: we'd execute the query once to retrieve the top 100, and if there is more, we'd do it again with 200, then 400, then 800, and so on.

Environment

None

Assignee

Fabio Massimo Ercoli

Reporter

Fabio Massimo Ercoli

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Affects versions

Priority

Major
Configure