I know how to use SQL_CALC_FOUND_ROWS with Limit to return total number of rows and results for pagination.
But my question is…
What if (for performance purpose) I want to show if total rows exceeds 1,000 I just want to return 1,000 (even if there are more records)?
SELECT Count(id) FROM table WHERE 1
I Google’d a lot but couldn’t find this. I thought of this thinking this may improve Fulltext search speed for example.
thanks in advance.
In many cases it can be faster, but you should test it: