I have a complex MySQL query, which takes a lot of time, choosing from the table more than 150 thousand rows and several JOINS and subqueries. I limit the number of results, but I need to know the total number of rows.
Is there a way to not repeat the request with COUNT(*)as a field to receive them? (repeating the request almost doubles the time it takes to complete the script)
source
share