WordPress.org

Make WordPress Core

Changeset 34217


Ignore:
Timestamp:
09/15/2015 08:52:40 PM (4 years ago)
Author:
boonebgorges
Message:

Omit the ORDER BY clause when updating object term cache.

The ORDER BY clause was forcing filesorts on large tables, and is
unnecessary, since term order doesn't matter when updating the cache.

Props mbrandys, wonderboymusic.
Fixes #28922.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy-functions.php

    r34051 r34217  
    32753275        return false;
    32763276
    3277     $terms = wp_get_object_terms($ids, $taxonomies, array('fields' => 'all_with_object_id'));
     3277    $terms = wp_get_object_terms( $ids, $taxonomies, array(
     3278        'fields' => 'all_with_object_id',
     3279        'orderby' => 'none',
     3280    ) );
    32783281
    32793282    $object_terms = array();
Note: See TracChangeset for help on using the changeset viewer.