0 votes
in Hibernate by

Can you tell the difference between setMaxResults() and setFetchSize() of Query?

1 Answer

0 votes
by
The setMaxResults() method limits the number of results returned by a query, while the setFetchSize() method controls the number of rows retrieved from the database at a time. setMaxResults() is used to limit the total number of results returned, while setFetchSize() controls the number of rows retrieved at a time to avoid memory issues.
...