Row_Number实现分页 1:首先是 select ROW_NUMBER() over(order by id asc) as 'rowNumber', * from table1 生成带序号的集合 2:再查询该集合的 第 1 到第 5条数据 select * from (select ROW_NUMBER() over(order by id asc) as 'rowNumber', * from table1) as temp where rowNumber betw…
先查下数据表的总条数: SELECT COUNT(id) FROM ts_translation_send_address 执行分页界SQL 查看使用时间2.210s SELECT * FROM ts_translation_send_address ORDER BY id LIMIT 2000000,10; 把sql语句优化后查询 SELECT * from ts_translation_send_address t INNER JOIN ( SELECT ID FROM ts_transla…