I want to optimize my paginated search result page
For example I have 100millions post to search. and user just type "a". It will take very long to search all of that because we use SQL_CALC_FOUND_ROWS for pagiation purposes
The fact is that there is no need to search all milions of rows (posts) and the answer "1000+" is enough for users. So we need to stop search after we found 1000 results.
We want to show information like this to user: Showing 1–10 of 1000+ results [RESULTS] Page 1 .... Page 100
How to do this without losing our pagination functionality?
My current query looks maybe something like this:
SELECT SQL_CALC_FOUND_ROWS xxx_posts.ID
FROM xxx_posts
WHERE 1=1
AND (((xxx_posts.post_title LIKE '%a%')
LIMIT 0, 10