[wp-trac] [WordPress Trac] #48014: Multiple _encloseme entries in postmeta table when disabling pings
WordPress Trac
noreply at wordpress.org
Wed Sep 11 12:56:30 UTC 2019
#48014: Multiple _encloseme entries in postmeta table when disabling pings
------------------------------+-----------------------------
Reporter: rebasaurus | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Pings/Trackbacks | Version: 5.2.3
Severity: normal | Keywords:
Focuses: performance |
------------------------------+-----------------------------
When we disable pings, this can lead to potentially hundreds of thousands
rows accumulating with the `_encloseme` key on the postmeta table (as it
is fired on every `publish_post` hook:
https://github.com/WordPress/WordPress/blob/71cf332e6569f0ac2f263ce9b2168644942f5534
/wp-includes/post.php#L6580) and therefore, cause performance issues on
simple meta queries that are normally run on pageload:
{{{
SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (x)
ORDER BY meta_id ASC
}}}
This is because the cleanup function `do_all_pings()` does not run anymore
on the `do_pings` hook:
https://github.com/WordPress/WordPress/blob/1e925a5ae3faccad31c48c810af3954d01a60f0e
/wp-includes/comment.php#L2626
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48014>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list