Slow SQL queries
-
Upon activation of Query Monitor, noticed a couple of slow queries all over the back-end coming from this plugin. The fix that worked for me is to limit calls of those queries only when using the plugin.
plugins\delete-thumbnails\delete-thumbnails.php
line 16:Change this:
function dlthumbs() { global $dlthumbs; if (is_admin()) // admin only $dlthumbs = new dlthumbs(); }
To this:
function dlthumbs() { global $dlthumbs, $pagenow; //ensure slow db calls aren't called everywhere in back-end if ( is_admin() && $pagenow == 'tools.php' && isset( $_GET['page'] ) && $_GET['page'] == 'dlthumbs' ) { $dlthumbs = new dlthumbs(); } }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Slow SQL queries’ is closed to new replies.