[wp-trac] [WordPress Trac] #36824: do_all_pings function queries all posts

WordPress Trac noreply at wordpress.org
Thu Sep 19 02:05:36 UTC 2019


#36824: do_all_pings function queries all posts
--------------------------------------+---------------------------
 Reporter:  spacedmonkey              |       Owner:  boonebgorges
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  5.3
Component:  Pings/Trackbacks          |     Version:  2.1
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+---------------------------
Changes (by boonebgorges):

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


Comment:

 In [changeset:"46178" 46178]:
 {{{
 #!CommitTicketReference repository="" revision="46178"
 Improve performance of trackback query in `do_all_pings()`.

 Previously, the direct SQL query used to identify trackbacks in
 `do_all_pings()` performed poorly, due to an unindexed query against the
 `to_ping` column. We improve performance in two ways. First, we switch
 to using a postmeta flag for posts that require trackbacks to be sent;
 queries joining against the postmeta table that check only the `meta_key`
 are generally quite fast. Second, we switch to the use of `WP_Query`,
 making the query cacheable and filterable using standard methods.

 Props dshanske, spacedmonkey, janw.oostendorp, mrmadhat, birgire.
 Fixes #36824.
 }}}

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


More information about the wp-trac mailing list