Pagination Query Count Slow
10/27/25Less than 1 minute
eq's toPageResult provides 3 parameters. If you pass a parameter greater than or equal to 0 for the third parameter, it means you told the framework how many totals there are in this query. Then the framework will not query count but directly use toList to return the result count pageSize in the form of limit+toList.
Combined with the frontend not performing page jumps, you can optimize performance degradation when pagination+count, and you can use Integer.MAX_VALUE as a fixed value.
Contributors
只是我