Skip to content

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

@beikov

Description

@beikov

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: -

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions