Search mode : "%LIKE%"
If a query does not return a result, still unnecessary queries are done.
I used a section with 59K records, the fieldsdata of those records contains only a 6 digit number.
To find out that there is no result it takes 1000 ms.
This could be reduced to 200ms, if the 3 additional queries are not being processed.
The first count query (See query 17 below) should be enough since it shows, that there are no records.
How much more if this section would contain articles with extensive description?
Btw, a fulltext search would only take 1ms ... :D
Improvement would be:
If no result, don't query further ...
Search mode : "%LIKE%"
If a query does not return a result, still unnecessary queries are done.
I used a section with 59K records, the fieldsdata of those records contains only a 6 digit number.
To find out that there is no result it takes 1000 ms.
This could be reduced to 200ms, if the 3 additional queries are not being processed.
The first count query (See query 17 below) should be enough since it shows, that there are no records.
How much more if this section would contain articles with extensive description?
Btw, a fulltext search would only take 1ms ... :D
Improvement would be:
If no result, don't query further ...