Plugin uses post_date_gmt, which is not indexed
-
The current version of the plugin (2013.0730.7777) uses the post_date_gmt database field:
SELECT
IDFROM{$wpdb->posts}WHERE ( (post_date_gmt> 0 &&post_date_gmt<= %s ) ) ANDpost_status= ‘future’ LIMIT 0,10For large installations, this is very very very slow, as the “post_date_gmt” field does not have an index.
The following would be much better:
SELECT
IDFROM{$wpdb->posts}WHERE ( (post_date> 0 &&post_date<= %s ) ) ANDpost_status= ‘future’ LIMIT 0,10…
$sql = $wpdb->prepare( $qry, current_time( ‘mysql’, 0 ) );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Plugin uses post_date_gmt, which is not indexed’ is closed to new replies.