If there are custom fields that are not used e.g., optional, in all entries, does this in any way affect performance? I am considering implementing a somewhat monolithic custom fieldset to be associated with various channels.
1 Answer
For each custom field you add, it adds at least 2 columns to the exp_channel_data
table, and if that table gets too big, it can affect performance in some respects.
I have a site with many channels and many fields, and my exp_channel_data
table is up to 600 columns. This becomes a problem when I want to add new custom fields. I have over 200k+ entries in that table, and it now takes several minutes to add a new custom field.
I haven't, however, noticed any major issues with the reading of the data... just the actions that require modifications to that table. Hope that helps some!
-
In that light, it seems to make sense to reuse custom fields across channels rather than duplicate fields in individual field sets. Of course, this can possibly create an UX issue for data entry but in my case, I don't think it will be too intense. Currently, I'm estimating that my channel_data table will be less than sixty columns for the entire site. My main concern is if there is overhead in querying empty cells in channels that will never use a column that exists to serve a different channel. Apr 1, 2015 at 0:20
-
1You can customize the publish page per channel, hiding fields that aren't used for a particular channel, to help with the publish/edit UX Apr 1, 2015 at 3:55
-