[wp-trac] [WordPress Trac] #37703: Optimise `wp_delete_comment` as called from `wp_delete_post`

WordPress Trac noreply at wordpress.org
Sun Aug 13 23:07:53 UTC 2017


#37703: Optimise `wp_delete_comment` as called from `wp_delete_post`
------------------------------------------+------------------------------
 Reporter:  peterwilsoncc                 |       Owner:
     Type:  enhancement                   |      Status:  new
 Priority:  normal                        |   Milestone:  Awaiting Review
Component:  Comments                      |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:  performance
------------------------------------------+------------------------------

Comment (by peterwilsoncc):

 Replying to [comment:2 Mte90]:
 > Looking right now in the code I didn't see forcing of an order on SQL
 query, maybe in the meantime this issue was fixed?

 This is correct, no order is specified in `wp_delete_posts`
 ([https://github.com/WordPress/wordpress-
 develop/blob/f628aaacda3d7882ddd00bc047de540bd2821f73/src/wp-
 includes/post.php#L2490 see wp-includes/post.php#L2490]). In most cases
 the DB defaults to insertion order, in this case ascending by date.

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


More information about the wp-trac mailing list