select count(1) from order where category='book'
조회결과 1억건.
select * from order where category='book' limit 0, 100
조회결과 100만건, 가장 빠름
select * from order where category='book' limit 50000000, 100
조회결과 100만건인데, limit의 한계로 매우 느림
5000만 데이터 조회후 100개씩 출력.. 50000000의 숫자가 커질수록 느려짐.(offset이 커지면 느려짐)
->
select * from order where category='book' and id > 50000000 limit 0, 100
offset을 0으로 만들어서 항상 빠르게함