I’d like to request a new feature that allows disabling the total count (count) in Spring Data REST endpoints. In some scenarios, especially with large datasets, counting all entities for pagination can lead to significant performance issues. Therefore, I believe it would be beneficial to have a configurable option to bypass the count query when it’s not essential for the client application.
Suggested Feature
Add a configuration option in Spring Data REST to:
Disable the total count in all paginated responses or use the Slice interface instead of Page for default find.
Optionally control the count per query/request: Allow overriding the count calculation on a per-request basis by setting a query parameter or using an annotation on repository methods.
Use Case
In cases where only the data of the current page is necessary (without the need for total elements) or with many data in bdd, the count query adds overhead. Disabling it could significantly improve response times for paginated endpoints working with large datasets.
I’d like to request a new feature that allows disabling the total count (count) in Spring Data REST endpoints. In some scenarios, especially with large datasets, counting all entities for pagination can lead to significant performance issues. Therefore, I believe it would be beneficial to have a configurable option to bypass the count query when it’s not essential for the client application.
Suggested Feature Add a configuration option in Spring Data REST to:
Disable the total count in all paginated responses or use the Slice interface instead of Page for default find. Optionally control the count per query/request: Allow overriding the count calculation on a per-request basis by setting a query parameter or using an annotation on repository methods.
Use Case
In cases where only the data of the current page is necessary (without the need for total elements) or with many data in bdd, the count query adds overhead. Disabling it could significantly improve response times for paginated endpoints working with large datasets.