[wp-hackers] lots of category items
halukkaramete at gmail.com
Thu Apr 5 22:10:34 UTC 2012
>>> By the time the MySQL is generated, it's just a bunch of
term_taxonomy_ids, whether those represent category terms or some mix of
taxonomies is irrelevant.
It was Otto's article (WordPress 3.1: Advanced Taxonomy Queries) that
suggested me the otherwise.
Cause it ends with this
>Advanced taxonomy queries are cool, but be aware that complex queries are
going to be slower. Not much slower, since the >code does attempt to do
things smartly, but each taxonomy you add is the equivalent of adding a
JOIN. While the relevant >tables are indexed, joins are still slower than
Regarding this very matter, I placed my comment at the of this article (
i'm the last commenter there as of now ) and here it is;
But, from what I understand from you, if at the end of the day it's a bunch
of ids, then yeah, I go all the way with CTs!
However, I don't think that's the case. I think each taxonomy you create
comes back at you as a join in the relavant query.
fruits>apple vs computers>apple
if you do not have two sep taxonomies, you got one apple and one ID.
but if you got two apple context, then, in order to pull those id's you
will involve the taxonomy, you cannot just ask gimme the apples in the
terms table. cause there are two, one as fruit and one as computer. see
what I mean?
so, before it ends up with "bunch of ids", yes there are some joins taking
place and that's the speed concern he was referring to in his article. But
the question was how much do I care about this...
Anyway, my points are all in the comment section. Hopefully someone reply
On Thu, Apr 5, 2012 at 12:36 PM, Casey Bisson <casey.bisson at gmail.com>wrote:
> I'm not sure your presumptions about query performance for multiple
> taxonomies are correct.
> WP3.4 is making some changes in this area that I haven't looked at, but a
> I think a taxonomy query with multiple terms is same whether or not those
> terms are in the same taxonomy. By the time the MySQL is generated, it's
> just a bunch of term_taxonomy_ids, whether those represent category terms
> or some mix of taxonomies is irrelevant.
> --Casey Bisson
> On Apr 3, 2012, at 8:58 PM, Haluk Karamete wrote:
> > An alternative to this is to use custom taxonomies. I could create 4-5
> > custom taxonomies such as media, topics, audience, collections, and
> > feature. As a result of this. I could get 5 or 6 different islands (
> > dropboxes ) that are each easy to get to. The problem with that would
> > manifest itself when I run queries that are tapping into those multiple
> > taxonomies.
> > Since I expect high traffic and lots of landing pages with a ton of
> > I do not want to go that route - just for the sake of getting individual
> > boxes on the admin screen at content entry time.
> > I do not want to cross multiple taxonomies when pulling posts.
> > for example from media, get the videos AND intersect that with from
> > audience the beginners stuff AND intersect that from collections with the
> > tutorials that are featured as must see... that's too much! isn't it?
> > When they all belonged in the same cat system, the query gets much
> > faster/efficient. True?
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers