Make WordPress Core

Opened 3 years ago

Last modified 22 months ago

#52360 new enhancement

speed up update_meta_cache with easy fix

Reported by: vladislavdavarashvili's profile vladislavdavarashvili Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Options, Meta APIs Keywords:
Focuses: performance Cc:

Description

wp-includes/meta.php:1061

<?php
$meta_list = $wpdb->get_results( "SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list) ORDER BY $id_column ASC", ARRAY_A );

in this request should avoid "ORDER BY $id_column ASC" to speed up this query (at least 3 times faster)

Change History (1)

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Options, Meta APIs

Hi there, welcome to WordPress Trac! Thanks for the ticket.

Just linking to some related tickets here: #14254, #42566.

Note: See TracTickets for help on using tickets.