Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
354 views
in Technique[技术] by (71.8m points)

MySql SQL_CALC_FOUND_ROWS disabling the order by clause

I am using MySql and SQL_CALC_FOUND_ROWS. It seems to be disabling the order by clause.

MySql Server version: 5.7.15-0ubuntu0.16.04.1 (Ubuntu)

SELECT SQL_NO_CACHE SQL_CALC_FOUND_ROWS * FROM (

disables the ORDER BY clause

I see it was supposed to be fixed.

Anyone have an ideal on how I can fix this issue?

Thanks Phil

http://www.michikono.com/2007/08/07/the-secret-of-sql_calc_found_rows/

Posted by Wade Bowmer on May 14 2006 11:40pm Be aware that using SQL_CALC_FOUND_ROWS and FOUND_ROWS() disables ORDER BY … LIMIT optimizations (see bugs http://bugs.mysql.com/bug.php?id=18454 and http://bugs.mysql.com/bug.php?id=19553). Until it’s fixed, you should run your own benchmarks with and without it.

https://bugs.mysql.com/bug.php?id=18454

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I did not find an answer for this issue. I just updated my select and it is not an issue.

I did open a bug on mysql.

https://bugs.mysql.com/bug.php?id=85530

Good luck. Phil


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...