[wp-trac] [WordPress Trac] #58368: WordPress dashboard is very slow when there are many comments (and the database isn't great)

WordPress Trac noreply at wordpress.org
Tue Jun 6 14:06:20 UTC 2023


#58368: WordPress dashboard is very slow when there are many comments (and the
database isn't great)
--------------------------------------+--------------------------
 Reporter:  Guss77                    |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  6.3
Component:  Comments                  |     Version:  6.2.2
 Severity:  minor                     |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by Guss77):

 Replying to [comment:19 peterwilsoncc]:
 > See the [https://github.com/WordPress/wordpress-develop/pull/4553 linked
 pull request] as a proof of concept to remove the `orderby` from all the
 orderby clauses from counting queries in WP-Develop.

 Thank you - this also looks like it will solve the problem (I'll be able
 to verify only much later).

 > With 180K comments, I am not seeing a great deal of difference in the
 dashboard

 From my experience this issue only manifests when the hardware is very
 constrained (see above comments about this) and/or a very large comments
 table. I think the database issue is that the MySQL server can't load the
 entire comments table into memory - which it needs to do for efficient
 sorting, and indexing does not help (there actually is a good index on the
 table). On my system with the issue, loading the comments table will
 require several times the RAM available to the MySQL server.

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


More information about the wp-trac mailing list