[wp-trac] [WordPress Trac] #37612: Use blog_id field while selecting blogs for networks upgrade

WordPress Trac noreply at wordpress.org
Tue Aug 9 11:38:43 UTC 2016


#37612: Use blog_id field while selecting blogs for networks upgrade
--------------------------------+-------------------------------------
 Reporter:  fliespl             |       Owner:  pento
     Type:  enhancement         |      Status:  closed
 Priority:  normal              |   Milestone:  4.7
Component:  Networks and Sites  |     Version:
 Severity:  normal              |  Resolution:  fixed
 Keywords:                      |     Focuses:  multisite, performance
--------------------------------+-------------------------------------
Changes (by pento):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"38229"]:
 {{{
 #!CommitTicketReference repository="" revision="38229"
 Multisite: Improve performance of the upgrade page on large networks.

 The query to select the next 5 blogs to upgrade was ordered by
 `registered`, which isn't indexed. This causes the query to table scan,
 which will be slow on networks with many blogs.

 The query only needs to be ordered by something that won't change, so
 ordering by `blog_id` is a good replacement. `blog_id` is indexed, and
 it's the only column being returned, so MySQL is able to optimize for a
 fast index read.

 Props fliespl.
 Fixes #37612.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/37612#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list