Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve order by performance for MySQL by omitting null precedence when encountering DB default #608

beikov opened this issue Jul 19, 2018 · 0 comments


Copy link

@beikov beikov commented Jul 19, 2018


MySQL by default sorts NULLS FIRST when ordering ASC and NULLS LAST when ordering DESC. To improve the performance of queries using ordering on MySQL, we should make use of that default by not rendering the null precedence emulation in that case.

Expected behavior

Omit the null precedence expression when using the default precedence of the database.

Actual behavior

The null precedence expression is always rendered for MySQL.

Steps to reproduce

Just use a simple query with ordering with MySQL.


Version: 1.2.1
JPA-Provider: Hibernate
Application Server: -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant