mysql性能优化,解决后台数据处理瓶颈之分页:
select * from orders where id > (select id from orders order by id desc limit 1000000, 1) order by id desc limit 0, 10;
select acct1.id,acct1.name,acct1.balance FROM account AS acct1 INNER JOIN (SELECT a.id FROM account a WHERE a.create_time > '2020-09-19' limit 100000, 10) AS acct2 on acct1.id = acct2.id;
|