Reputation: 2469
In MySQL, would it be faster to use:
The advantage of the first option is the ability to read and update specific values only. In the second one this would have to be handled via PHP.
The possible disadvantage of the first option may be the column count if the whole row has to be selected (or even more of them). In the second option only one varchar value would be selected per row and the rest handled via PHP. Not exactly sure about this one.
PS: Around what column count would the answer change if at all?
Upvotes: 2
Views: 107
Reputation: 40481
As I see it, the use of a long varchar column , that consist many properties inside it, is wrong , because the maintenance and the handling with it will be bad and difficult , and could lead to many errors that will be hard to spot.
Each indication should have a column of it's own , and the optimizer should know how to deal with many boolean columns efficiently .
Upvotes: 1