-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
從以下哪個更好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
LIMIT Y
是短期的LIMIT 0,Y
所以我看不出在性能增益任何範圍內。
感謝您的回覆。是的,兩者都一樣,但哪一個更好? – VeeR
'LIMIT Y'與LIMIT 0,Y'相比是兩個字符,所以如果你非常重視你的時間,我建議你使用'LIMIT Y'。 – phreakv6