[wp-trac] [WordPress Trac] #59488: Add index to comment_type and comment_approved fields in comment table

WordPress Trac noreply at wordpress.org
Thu Sep 28 12:43:53 UTC 2023


#59488: Add index to comment_type and comment_approved fields in comment table
--------------------------+-----------------------------
 Reporter:  spacedmonkey  |      Owner:  (none)
     Type:  enhancement   |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  3.0
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 Follow on from #58368

 It is common to query comments by `comment_type` or `comment_approved`.
 There are several query done in the admin to get counts for different
 screens. But for sites with many comments, this results in slow returning
 queries. Add database indexes to these two fields to improve database
 performance.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59488>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list