Skip to content

Why does Blaze-Persistence project count queries for pagination despite potential performance issues? #1919

Answered by beikov
gain7x asked this question in Q&A
Discussion options

You must be logged in to vote

The main idea of this is to avoid executing a second query for determining the page count, but as you noticed, this behavior can be configured.

Doesn't this count query executed for each row potentially cause performance issues?

If your database isn't capable of realizing that this is an uncorrelated subquery, this would indeed be a problem, but then your database query optimizer probably has a hard time with a lot of other things as well. Since the subquery is uncorrelated, it should only be executed once.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@gain7x
Comment options

Answer selected by gain7x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants