2016-09-27 47 views
-1

从以下哪个更好MySQL的性能极限X1或限价0,X

select * , 98 as match_score from table_name order by match_score desc limit Y 

select *, 98 as match_score from table_name order by match_score desc limit 0,Y 

回答

0

LIMIT Y是短期的LIMIT 0,Y所以我看不出在性能增益任何范围内。

+0

感谢您的回复。是的,两者都一样,但哪一个更好? – VeeR

+0

'LIMIT Y'与LIMIT 0,Y'相比是两个字符,所以如果你非常重视你的时间,我建议你使用'LIMIT Y'。 – phreakv6