[wp-trac] [WordPress Trac] #10142: Add metadata support for taxonomies

WordPress Trac wp-trac at lists.automattic.com
Sat Feb 19 05:40:58 UTC 2011


#10142: Add metadata support for taxonomies
-------------------------------------------------+-------------------------
 Reporter:  sirzooro                             |       Owner:
     Type:  feature request                      |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
Component:  Taxonomy                             |  Release
 Severity:  normal                               |     Version:
 Keywords:  has-patch needs-testing 2nd-opinion  |  Resolution:
-------------------------------------------------+-------------------------

Comment (by mikeschinkel):

 Replying to [comment:36 dd32]:
 > The reasoning for saying it like that, Is that Meta for objects always
 has a primary target, which is where the majority of the meta goes in 99%
 of scenario's, which is followed by a few other related spurs, which 10%
 of sites might use 1% of the time on average.
 >
 > To make a specific table for (for example) taxonomy relationships to
 objects would probably fall into the 95/5% use case bin, where for the 5%
 that need it, 75% of those will find a prefix a working solution. The
 others will feel the need for a new table. Those that need the new table
 in the specific implementations are free to do so if they desire the extra
 performance gains that it may give them.

 Fair point.  But let's look at statistics form another perspective.

 For almost any site that uses or needs taxonomy meta the likelihood of
 having more than 1000 `term_taxonomy records` in a given taxonomy is very
 low; wouldn't you agree?  As such, optimizing it doesn't really make much
 sense; we can easily simulate with `wp_options` and `'taxterm_' .
 $taxonomy_term->taxonomy_term_id` without any scalability issues.

 On the other hand the likelihood of having 1000 or even 10,000 or more
 `wp_term_relationships` records is reasonably high and the chances of
 100,000+ or even 1 million such records is not complete remote.  So
 leaving the only option in core for `term_relationship` meta to use a 255
 byte key effective ensures it cannot be use for any site that might grow
 beyond a moderate number of post records in order to optimize for the case
 that won't ever need to scale.

 Given that analysis if I was given the option to ONLY have meta for
 `term_taxonomy_id` OR for `object_id+term_taxonomy_id` I would pick the
 latter because it would be easy to simulate the former in a performant way
 with `0+term_taxonomy_id`.

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


More information about the wp-trac mailing list