-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed as not planned
Closed as not planned
Copy link
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fix
Description
A business requirement was presented to add totals to paged tables, demanding the summation of selected columns across all records, regardless of the displayed page.
The findAll(Specification, Pageable)
method in Spring Data already executes two queries: one for the paginated data and another for the total count. I sought a way to optimize this process by calculating the totals within the same query, but found no native solution.
To avoid the overhead of an additional query, I implemented the pagination, count, and sum logic directly in the application, achieving the desired result.
I am opening this issue to check if this is a common use case and to discuss the feasibility of a generic solution within the framework itself.
Metadata
Metadata
Assignees
Labels
for: external-projectFor an external project and not something we can fixFor an external project and not something we can fix