Open newman1234 opened 2 years ago
where > order by > limit > select
order by + limit N 如果 column 有 index,會非常快,即使沒有 index,也會在找到 N 個 result 後 return 結果並不會執行完整個 sort https://dev.mysql.com/doc/refman/5.7/en/limit-optimization.html
where > order by > limit > select