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

Closed
beikov opened this issue Jul 19, 2018 · 0 comments

Comments

@beikov
Copy link
Member

commented Jul 19, 2018

Description

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.

Environment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.