Leave a Reply

1 comment

  1. If you need to search by your meta_key/meta_value then do not store them in a single key. If you store as a single key then you are going to have to store your data as serialized string, or something similar. The only way you can search that would be via an inefficient %LIKE% query which would also probably be prone to error. Something similar is true if you need to sort queries on any of your values. You can’t get any reasonable kind of human-like alphabetical or numeric sorting out of a serialized string. If you expect you might need to do any manipulation at the database level, store as individual meta_keys.

    If, however, all you will ever need is to pull the data by the meta_key out of the database as a monolithic block you should be fine.