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!

1 Answer 1


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?

  • Exactly what I was looking for. You confirmed what I suspected. Thanks @MathSmith!
    – adam5280
    Jan 31, 2013 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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