In what cases would a one-to-one relationship necessary improve performance?

1
I have a simple object with only a few fields, but it comes a long with a lot of metadata attributes (appr. 20). Those attributes will not be used very often. Would it make sense to separate these and add a one-to-one relationship instead for performance sake?
asked
2 answers
1

No, Mendix will always retrieve all 1:1 associated objects when the main object is retrieved. The database performance is not influenced by 20 attributes.

answered
0

From a performance point of view you are probably worse of seperating out attributes in a seperate entitity. If you have everything in one record, the database will only have to look up one record, when it has, retrieving the attributes form it is easy.

If you have a seperate entitity, even it is only sometimes used, in the cases it will be used, the database will need to do a seperate lookup for the other entitity. It would also probably result in an extra round trip for the client, which has an even bigger performance impact.

Also, do you have a good reason why you're looking into this as a way of improving performance, or is this just out of curiosity?

answered