As well, if you are pulling out the status and location checks into an outer query, you could add LIMIT p_limit + p_offset to that query too. That could help speed up the lower pages at least.
As well, if you are pulling out the status and location checks into an outer query, you could add LIMIT p_limit + p_offset to that query too. That could help speed up the lower pages at least.