Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve order by performance for MySQL by omitting null precedence when encountering DB default #608
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.
Omit the null precedence expression when using the default precedence of the database.
The null precedence expression is always rendered for MySQL.
Steps to reproduce
Just use a simple query with ordering with MySQL.