'MySQL normalization issue with performance

I have a table of shops and anoher table of shop configs (plan, discounts and Others configs), I need to add some Fields to store SMTP configs.

Should I create 5 Fields (host,Port,user,pass,ssl) or create 1 field and store a JSON with these informations?



Solution 1:[1]

If those fields need to be used for searching/filtering (where clause) or for sorting/grouping (order by/group by), then make individual fields for them. If not, saving as JSON encoded or comma delimited will work fine. If the data content lengths are fairly constant for each field, you may save some space by defining individual fields, but unless you have a lot (millions?) of records, disk space is cheap....

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sloan Thrasher