We are working on a project that has some product attribute design. I don’t think saving attributes as comma separated would be a good practise . But my friend told me that comma separated list will save space.
I read the article in stackoverlow Is storing a delimited list in a database column really that bad?
But nobody there mentioned about memory problem, all of them praised about keeping separate records. Anybody can tell me the real story?
Bill’s answer in the linked question covers the issues rather nicely. There are few, if any, realterm benefits in storing data in such an unnormalised form. Using multi-value fields WILL cost you in the long term and probably short term too.
If you are 100% sure that your application will NEVER need to process (filter, order by, group by, etc) the contents of your serialised data (comma separated list) then it will have no impact on your application. In most cases where people make this assumption they “get their fingers burnt” as the requirements for the application change with time.
Processing multi-value fields will need more memory and more CPU cycles due to the full table scans required to do anything other than simply read the contents of the field. Googling for “mysql multivalued fields performance problems” returns many results.