Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> EXPLAIN SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
- -> FROM wp_posts
- -> LEFT JOIN wp_term_relationships
- -> ON (wp_posts.ID = wp_term_relationships.object_id)
- -> WHERE 1=1
- -> AND ( wp_term_relationships.term_taxonomy_id IN (3) )
- -> AND wp_posts.post_type = 'post'
- -> AND ((wp_posts.post_status = 'publish'))
- -> GROUP BY wp_posts.ID
- -> ORDER BY wp_posts.post_date DESC
- -> LIMIT 0, 6;
- +----+-------------+-----------------------+----------------------+--------+---------------------------------------------------------------------------------+----------------------+---------+-------------------------------------+-------+----------+-----------------------------------------------------------+
- | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
- +----+-------------+-----------------------+----------------------+--------+---------------------------------------------------------------------------------+----------------------+---------+-------------------------------------+-------+----------+-----------------------------------------------------------+
- | 1 | SIMPLE | wp_posts | NULL | ref | PRIMARY,post_name,type_status_date,post_parent,post_author,type_status_date_ndx | type_status_date_ndx | 164 | const,const | 39756 | 100.00 | Using where; Using index; Using temporary; Using filesort |
- | 1 | SIMPLE | wp_term_relationships | p0,p1,p2,p3,p4,p5,p6 | eq_ref | PRIMARY,term_taxonomy_id | PRIMARY | 16 | xxxx.wp_posts.ID,const | 1 | 100.00 | Using index |
- +----+-------------+-----------------------+----------------------+--------+---------------------------------------------------------------------------------+----------------------+---------+-------------------------------------+-------+----------+-----------------------------------------------------------+
- 2 rows in set, 1 warning (0.00 sec)
- mysql> EXPLAIN SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
- -> FROM wp_posts
- -> WHERE wp_posts.post_type = 'post'
- -> AND wp_posts.post_status = 'publish'
- -> ORDER BY wp_posts.post_date DESC
- -> LIMIT 0, 6;
- +----+-------------+----------+------------+------+---------------------------------------+----------------------+---------+-------------+-------+----------+--------------------------+
- | id | select_type | table | partitions | type | possible_keys | key | key_len | ref | rows | filtered | Extra |
- +----+-------------+----------+------------+------+---------------------------------------+----------------------+---------+-------------+-------+----------+--------------------------+
- | 1 | SIMPLE | wp_posts | NULL | ref | type_status_date,type_status_date_ndx | type_status_date_ndx | 164 | const,const | 39756 | 100.00 | Using where; Using index |
- +----+-------------+----------+------------+------+---------------------------------------+----------------------+---------+-------------+-------+----------+--------------------------+
- 1 row in set, 1 warning (0.00 sec)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement