I need to save data (assoc array with 6 values) to database table. What is better – create one “text” field in exciting table (and unserialize field value when read) or create another table and join it every time? What variant will be faster executed?
Sorry for my english 🙂
Depends on what data you are storing.
Is this array going to have the same keys always, for every row in the existing table? Then either add them to that table or join them in.
Is the array a sort of hodge-pdoge of miscellaneous keys and values? Then it might make more sense to store the serialized version.
The difference in execution time will likely be so negligible its not even worth thinking about.