In search pages, users have access to first 1000 results. Currently I use following
SELECT COUNT(*) as count FROM (SELECT * FROM jobs WHERE MATCH (title, company, state, city) AGAINST ('senior software engineer san fransisco california') LIMIT 1000) AS a
in order to create pagination.
Is there any faster alternative?
PS: Without any limit, some searches have 10 results, some have 500,000 results.
PS 2: I actually wanted to get exact or rough number of results but it is much slower then the SQL I currently use.