refresh function dealcok
-
We use the plugin in a big db (100.000<posts) and we got deadlock in the sql due to the refresh function of your plugin and particularly the query
// Here's the optimization $wpdb->query("SET @row_number = 0;"); $wpdb->query("UPDATE $wpdb->posts as pt JOIN ( SELECT ID, (@row_number:=@row_number + 1) AS <code>rank</code> FROM $wpdb->posts WHERE post_type = '$object' AND post_status IN ( 'publish', 'pending', 'draft', 'private', 'future' ) ORDER BY menu_order ASC ) as pt2 ON pt.id = pt2.id SET pt.menu_order = pt2.<code>rank</code>;");I just commented out the action refresh for the admin hook. Is that OK? It seems that the plugin still works.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘refresh function dealcok’ is closed to new replies.