Skip Navigation

[Resolved] Whether to use taxonomy or checkboxes custom fields

This thread is resolved. Here is a description of the problem and solution.

Problem:
Are there performance reasons to choose taxonomy checkboxes vs a checkboxes custom field?

Solution:
In general taxonomies are more performant than custom fields when it comes to querying posts. Taxonomies are stored in custom tables optimised for the purpose, while custom fields are stored in the general purpose wp_postmeta table. On smaller sites the difference would be too small to notice, on larger sites with more traffic the difference might be noticeable.

Relevant Documentation:
http://ottopress.com/2011/when-to-not-use-a-custom-taxonomy/
https://tomjn.com/2017/02/27/not-post-meta-bad/

This support ticket is created 6 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 6 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#602478

Jay

I was wondering if anything has changed in the new Types beta regarding checkboxes being saved as serialized arrays? Last I read, it was only checkboxes and skype fields that were serialized.

Regarding checkboxes specifically, I was wondering about filtering custom field checkboxes vs taxonomy checkboxes. Is there a difference in performance vs flexibility? This area is very unclear to me still.

I have read some posts on here suggesting that if you were to need checkboxes, it might be best to store them as tax terms rather than custom fields. Why would this be?

#602513

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Jay

Nothing has changed with how Types custom fields are stored in the beta, so, yes, checkboxes fields are stored as a serialised array.

I'm not sure what you have read, but in general taxonomies are more performant than custom fields when it comes to querying posts. Taxonomies are stored in custom tables optimised for the purpose, while custom fields are stored in the general purpose wp_postmeta table. On smaller sites the difference would be too small to notice, on larger sites with more traffic the difference might be noticeable.

You might find these couple of articles helpful in deciding whether to use taxonomies or custom fields for your particular use:

hidden link
hidden link