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

WordPress Trac noreply at wordpress.org
Mon Dec 27 18:47:11 UTC 2021


#54346: Slow SQL queries fetching posts from specific categories
---------------------------------------+-----------------------------------
 Reporter:  Krstarica                  |       Owner:  (none)
     Type:  enhancement                |      Status:  new
 Priority:  normal                     |   Milestone:  Awaiting Review
Component:  Taxonomy                   |     Version:
 Severity:  normal                     |  Resolution:
 Keywords:  needs-patch needs-testing  |     Focuses:  rest-api,
                                       |  performance
---------------------------------------+-----------------------------------

Comment (by joseaneto):

 Like @Krstarica we have had identical SQL performance problems with the
 LEFT JOIN query from the "get_sql_for_clause" function in some WordPress
 installations with +500,000 records in the posts table.

 We have been using their solution in production and works perfectly,
 returning optimal performance on SQL queries, many going from +150 seconds
 to milliseconds.

 Hopefully, this change can be translated into an upcoming update.

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


More information about the wp-trac mailing list