In the site I’m trying to optimize, I noticed several queries that are rather slow and start with SELECT SQL_CALC_FOUND_ROWS
Searching this site, the relevant question wordpress query causing load has no adequate answer, in my opinion.
Can I somehow disable SQL_CALC_FOUND_ROWS
without breaking too many things – if possible breaking nothing? It seems that pagination relies on this.
@Wyck advised me to read this core ticket: #10964. After reading it, I can’t really understand if the ticket been completely resolved, it seems not.
In any case, is there a way to disable SQL_CALC_FOUND_ROWS
?
First should only disable
SQL_CALC_FOUND_ROWS
if you aren’t using pagination, to do so set parameterno_found_rows
totrue
in WP_Query.Note
get_posts()
does that by default.