Deep paging optimization

In my understanding, there are two solutions for deep paging? In fact, there is no perfect solution. Just choose the appropriate one according to the specific scenario.

1. For cursor query, please go to my article Usage Scenarios of Cursor Query-CSDN Blog

2. Covering index + subquery

Just query the primary key id by paging first, and then in(id)

select *

from student where id in (select id from student limit 1000,5)

Guess you like

Origin blog.csdn.net/weixin_59244784/article/details/133325982