Hi, today we migrate the site to Nespaper Theme it is very inestable because, some module, is using a sql query than is puting down the server.
I used all the recomendations, using cache, optimizing all in my hand to make this site faster.
But the SQL_CALC_FOUND_ROWS is making the querys and the site very slow, i choosed delete from my home page and single page all the functionalities that may be was using “pagination and sorting results”. But some query is still there.
In the logs of the server i can see only this.
| 4753 | root | localhost | | Query | 0 | | show processlist |
| 6325 | la4r3n4 | localhost | DataBaseName | Query | 4 | Sorting result | SELECT SQL_CALC_FOUND_ROWS wp___posts.ID FROM wp___posts WHERE 1=1 AND (((wp___ |
| 6326 | la4r3n4 | localhost | DataBaseName | Query | 4 | Sorting result | SELECT SQL_CALC_FOUND_ROWS wp___posts.ID FROM wp___posts WHERE 1=1 AND (((wp___ |
| 6328 | la4r3n4 | localhost | DataBaseName | Query | 3 | Sorting result | SELECT SQL_CALC_FOUND_ROWS wp___posts.ID FROM wp___posts WHERE 1=1 AND (((wp___ |
| 6329 | la4r3n4 | localhost | DataBaseName | Query | 3 | Sorting result | SELECT SQL_CALC_FOUND_ROWS wp___posts.ID FROM wp___posts WHERE 1=1 AND (((wp___ |
| 6331 | la4r3n4 | localhost | DataBaseName | Query | 3 | Sorting result | SELECT SQL_CALC_FOUND_ROWS wp___posts.ID FROM wp___posts WHERE 1=1 AND (((wp___ |
| 6332 | la4r3n4 | localhost | DataBaseName | Query | 2 | Sorting result | SELECT SQL_CALC_FOUND_ROWS wp___posts.ID FROM wp___posts WHERE 1=1 AND (((wp___ |
| 6337 | la4r3n4 | localhost | DataBaseName | Sleep | 1
This is de URL of the site: http://goo.gl/nGA3dp
What i should disable in the theme for stop this query??
Thank you!!
Hi,
The theme makes all database requests via wordpress, we don’t use direct database queries. The following function is used to on all blocks – http://screencast.com/t/rZk523NGAai
Try to disable all plugins and check if the issue is still there.
If this doesn’t help please send us a copy of your error.log file via email at contact@tagdiv.com , also include more details about this issue and if possible provide wp-admin and ftp access so we can take a look.
Thank you!
Hi Emil,
obviously, the problem is not in your theme, but the thing is that usually, people who use your theme have a big number of posts which leads to this problem. Would be helpful if you could take into consideration this topic: https://wordpress.org/support/topic/slow-queries-sql_calc_found_rows-bringing-down-site also some useful info here: https://wpartisan.me/tutorials/wordpress-database-queries-speed-sql_calc_found_rows which means that you’ll only need to put one function in your functions.php file. The only problem with this solution is that it removes pagination from the theme which you could probably solve a lot faster than we – enthusiasts of optimisation 🙂
Hi
Thanks you for these helpful links, we will take a look there when we will make changes in theme’s queries. We work constantly to optimize and improve queries made by the theme so execution time to be as low as possible and data to be served in shortest time.
Have a nice day.
