Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 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 Reply

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...