WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have custom type posts that I need to separate by year as the posts are entries in an annual contest. Would it be better in the long run for efficiency of queries, speed, etc to simply use the built in post date or set up a custom taxonomy to group these posts into years?

I notice that post_date is stored in the wp_posts table, so it seems to me that this would make for speedier queries than having to reference the separate taxonomy table.

Thank you!

share|improve this question
up vote 1 down vote accepted

I can't see any practical reason to use a custom taxonomy here. You can already query posts by year using OOB query and archive stuff (see this Codex article about the "year" WP_Query parameter, and this one about the "yearly" mode for wp_get_archives()).

If you're asking purely about performance, I'd consider this kind of thing (a single table query vs. a simple join) a "micro-optimization". For 95% of WordPress sites, it won't make any visible difference. And if your site is at the point where you need serious tuning, there are probably better places to focus energy (like identifying really slow queries, and having a good caching strategy).

Hope that helps?

share|improve this answer
Exactly what I was looking for. You confirmed what I suspected. Thanks @MathSmith! – Adam Jan 31 '13 at 16:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.