How to improve my query where I have used offset in mysql. I am trying to make pagination.
I have a database there I have more then 800k data for a single column.
Example: My table data like:
-----------------------------------
|id | ip_to | ip_from | country |
When I run a query like
SELECT * FROM ipdetails WHERE cournty= 'US' LIMIT 1000 OFFSET 800000;
It takes more then 20 second. I have already create index with country
How can I solve this in this problem. I want to make it fast
You can test it lively.
https://ip.team71.link/public/find-by-country-code?countryCode=US&page=830