Make WordPress Core

Ticket #17745: sql_optimization.patch

File sql_optimization.patch, 981 bytes (added by pavelevap, 15 years ago)
  • inc/widgets.php

     
    6060                $ephemera_args = array(
    6161                        'order' => 'DESC',
    6262                        'posts_per_page' => $number,
    63                         'nopaging' => 0,
     63                        'no_found_rows' => true,
    6464                        'post_status' => 'publish',
    6565                        'post__not_in' => get_option( 'sticky_posts' ),
    6666                        'tax_query' => array(
  • showcase.php

     
    4949                                                'post__in' => $sticky,
    5050                                                'post_status' => 'publish',
    5151                                                'posts_per_page' => 10,
     52                                                'no_found_rows' => true,
    5253                                        );
    5354
    5455                                        // The Featured Posts query.
    … …  
    174175                                                                'operator' => 'NOT IN',
    175176                                                        ),
    176177                                                ),
     178                                                'no_found_rows' => true,
    177179                                        );
    178180                                        // Our new query for the Recent Posts section.
    179181                                        $recent = new WP_Query();