You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
QuerydslJpaPredicateExecutor.exists() solves the existence test non-optimally #2333
The current implementation of QuerydslJpaPredicateExecutor.exists(Predicate predicate) appears to generate a SELECT count(..) FROM ... WHERE <predicate> query and then tests if this result is > 0 to determine if there are any results matching the predicate.
For larger datasets, this is a bit inefficient. It seems that one could do a SELECT * FROM ... WHERE <predicate> LIMIT 1 and test if any results are returned.
Does this sound reasonable? If so, I can create a PR to try and address.
changed the title [-]QuerydslJpaPredicateExecutor.exists() solves the existence test non-optimally[/-][+]`QuerydslJpaPredicateExecutor.exists()` solves the existence test non-optimally[/+]on Oct 13, 2021
Activity
[-]QuerydslJpaPredicateExecutor.exists() solves the existence test non-optimally[/-][+]`QuerydslJpaPredicateExecutor.exists()` solves the existence test non-optimally[/+]schauder commentedon Oct 18, 2021
Sounds like a good improvement.
I'm looking forward to your PR.
Optimize QuerydslJpaPredicateExecutor.exists(Predicate)