Skip Navigation

[Resolved] Site Performance

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

Problem: I would like to know if it's better to reuse fields across multiple post types, or if it's better to create similar fields specific to each post type.

Solution: It's better to reuse fields if possible, especially if your site uses these fields for filtering Views.

This support ticket is created 5 years, 8 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by nikolaS-3 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1233456

Tell us what you are trying to do?
I'm building this complex site which should have around 15 CPT.

Each CPT should have same or different custom fileds. For instance 5 of 15 CPT will have location map (Google Maps) or 10/15 will have a "Web link" filed.

So my question is: Is it better to make modular custom fileds and assign for example web link filed on 10 CPT -- OR -- to create web link filed for each CPT?

I'm just trying to figure out will it affect preformance if if create 10 same custom fileds for each CPT.

Thanks

#1233590

Hello, in general I would reuse the same fields as much as possible across different post types. Otherwise, you may not be able to effectively search, sort and filter using those fields in Views. For example, if you have a custom field "size" applied to 10 different post types, you can create a View filtered by size and display results from all 10 different post types. The filter works well because the same attribute is being compared for all post types. However, if you have separate custom fields, like size-A, size-B, size-C, size-D, size-E and so on for all different post types, then it's not possible to effectively filter a View by size.

It's best to consolidate fields as much as possible from a performance perspective, as well. Indexing fewer attributes will be faster than indexing more attributes. Queries will be simpler, which leads to faster performance.

Let me know if you have additional questions about that.

#1233685

My issue is resolved now. Thank you!