Ok this might be a hardcore question? I was just wondering if there was a “break-even” point for explode vs columns in a database.
For example:
Explode 100 times or get data from 100 columns which is “better/faster”?
Real world example would be a single col for last_name,first_name vs 2 cols.
(I guess one would also have to think about if this data needs to be changed.)
My understanding is that explode uses the client side resources whereas pulling data from the database uses the server side.
Just wondering if there is a “rule of thumb”?
You should always split your data into separate columns where applicable.
Not because of performance, but because of the rules of database normalization.
http://en.wikipedia.org/wiki/Database_normalization
Performance wise, its subjective. It depends on what you are doing with your data, and a lot of other factors that we couldn’t guess with the limited information you have given us. But my hunch is that columns would be faster.