[wp-trac] [WordPress Trac] #54346: Slow SQL queries fetching posts from specific categories

WordPress Trac noreply at wordpress.org
Thu Jun 22 17:17:13 UTC 2023


#54346: Slow SQL queries fetching posts from specific categories
-------------------------------------------------+-------------------------
 Reporter:  Krstarica                            |       Owner:
                                                 |  johnbillion
     Type:  enhancement                          |      Status:  accepted
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Taxonomy                             |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-testing has-patch has-unit-    |     Focuses:  rest-api,
  tests                                          |  performance
-------------------------------------------------+-------------------------

Comment (by spacedmonkey):

 @johnbillion If it helps, I used a plugin called fakerpress to generate
 35k work of posts and categories.

 I had around 500 categories as well. I think the nest query is not fast if
 you have lots of categories or posts. If you have 2k post of posts
 assigned to one category, the nested query will be slow.

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


More information about the wp-trac mailing list