Problem statement
I've a big table users
composed of 2 different kinds of users, A and B. At the moment, they share some fields, while other fields are A-only or B-only.
Now, normally with a proper normalization on this table, we can end up having 1 shared table with 2 related tables with the A-fields and B-fields. However, my goal is to reduce the space but also keeping the same performances if possible.
My solution
My solution would be using a JSON type to store those fields that are not shared between the 2 different user types but at the same time creating generated and indexed virtual columns for those fields that need to be indexed. It should save space because MySQL won't allocate space for not used fields and at the same time it keeps more or less the same performances thanks to the virtual columns + indexes. Moreover, these fields won't be used as foreign keys so the virtual column is not a limitation for me.
Question
Looking around it seems that people don't suggest using the JSON type to avoid wasting space with not used fields. Instead, using normal fields with separate tables is still strongly suggested. Do you think I'm approaching the wrong way using JSON instead of the actual fields? if yes, why?