[wp-trac] [WordPress Trac] #28439: Add 'post_date' as a possible orderby argument to get_terms()
WordPress Trac
noreply at wordpress.org
Tue Jun 3 15:16:28 UTC 2014
#28439: Add 'post_date' as a possible orderby argument to get_terms()
----------------------------------------+------------------------------
Reporter: jchristopher | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 3.9.1
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+------------------------------
Changes (by jchristopher):
* keywords: has-patch => has-patch needs-unit-tests
Comment:
Here's an `EXPLAIN` from my test site which admittedly only has 4
Categories and 3 Posts:
{{{
EXPLAIN SELECT t.*, tt.*
FROM wpsvn_terms AS t
INNER JOIN wpsvn_term_taxonomy AS tt
ON t.term_id = tt.term_id
JOIN wpsvn_term_relationships AS tr
ON tr.term_taxonomy_id = tt.term_taxonomy_id
JOIN wpsvn_posts AS p
ON p.ID = tr.object_id
WHERE tt.taxonomy IN ('category')
ORDER BY p.post_date DESC
}}}
|| id || select_type || table || type || possible_keys || key || key_len
|| ref || rows || Extra ||
|| 1 || SIMPLE || tt || ALL || PRIMARY,term_id_taxonomy,taxonomy || NULL
|| NULL || NULL || 4 || Using where; Using temporary; Using filesort ||
|| 1 || SIMPLE || tr || ref || PRIMARY,term_taxonomy_id ||
term_taxonomy_id || 8 || wpsvn.tt.term_taxonomy_id || 1 || Using index ||
|| 1 || SIMPLE || t || ALL || PRIMARY || NULL || NULL || NULL || 4 ||
Using where; Using join buffer ||
|| 1 || SIMPLE || p || eq_ref || PRIMARY || PRIMARY || 8 ||
wpsvn.tr.object_id || 1 || ||
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28439#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list