[wp-trac] [WordPress Trac] #24837: querying optimization for category AND searching

WordPress Trac noreply at wordpress.org
Fri Aug 16 14:26:46 UTC 2013


#24837: querying optimization for category AND searching
-------------------------------------+------------------------------
 Reporter:  robertv123               |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Taxonomy                 |     Version:  3.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------------------

Comment (by robertv123):

 I took a look and the query was all ready using index type_status_date. My
 feeling is that the query is simply too complex for mysql. Two group by's
 and a sub query. Mysql is just trying to sort out simple sub queries in
 the current unstable db.

 {{{
 +----+--------------------+-----------------------+-------+--------------------------+------------------+---------+--------------------------+-------+--------------------------+
 | id | select_type        | table                 | type  | possible_keys
 | key              | key_len | ref                      | rows  | Extra
 |
 +----+--------------------+-----------------------+-------+--------------------------+------------------+---------+--------------------------+-------+--------------------------+
 |  1 | PRIMARY            | wp_posts              | index |
 type_status_date         | type_status_date | 140     | NULL
 | 47456 | Using where; Using index |
 |  2 | DEPENDENT SUBQUERY | wp_term_relationships | ref   |
 PRIMARY,term_taxonomy_id | PRIMARY          | 8       | test.wp_posts.ID |
 1213 | Using where; Using index |
 +----+--------------------+-----------------------+-------+--------------------------+------------------+---------+--------------------------+-------+--------------------------+

 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/24837#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list