JQPL pagination query observation

Hi,

Jmix 1.5.0

If i add pagination on a workbench so the expected result is that query will fetch only 50 records as per pagination of 50, also when JQPL query is executed then in debug logs we can see maxresult result is also 50. But my query is does it only fetch 50 records only or all records and then apply pagination internally. If it fetch all detail so can we restrict it to 50 only as per pagination since fetching all records can leads to slowness.

Do you mean the pagination of a collection that is fetched along with the root entity by JPA? If so then you cannot apply maxResults on the database level for this collection.

Use a standalone collection data container with its own JPQL query to be able to apply pagination at the database level. See an example in the docs: Using Data Components :: Jmix Documentation

Regards,
Konstantin