[wp-trac] [WordPress Trac] #35137: get_terms() with a meta_query filter returns duplicated terms

WordPress Trac noreply at wordpress.org
Thu Dec 17 23:06:30 UTC 2015


#35137: get_terms() with a meta_query filter returns duplicated terms
------------------------------------------+------------------
 Reporter:  jadpm                         |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  4.5
Component:  Taxonomy                      |     Version:  4.4
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+------------------

Comment (by pento):

 I suspect there'll be no practical difference.

 For simple and un-indexed queries, `DISTINCT` is usually faster. It
 doesn't have an implicit sort, so it can return as soon as its read enough
 rows.

 As this query is already sorting, and it will be using the primary key on
 `wp_terms`, the `GROUP BY` will run at the same speed.

 Also, given that this functionality was introduced in 4.4, I'm inclined to
 fix this in 4.4.1.

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


More information about the wp-trac mailing list