Speed of retrieving entities

Hi, Is there any speed benefit to having lots of different entities rather than one very long entity? 
2 answers

If you consider performace as speed, then yes. Mendix always retrieves all columns of an object so the more columns you have, the more data it will retrieve. And slower it will get, and possibly run out of memory in the process of retrieving all that data. And in most cases you don't need all the attributes. So you should consider a domain model with associated entities and attributes where you retrieve the information that you need for your actions.


Hi Ben, 

It must always be a balance and the decision must be based on the business requirement and performance requirement.

  1. One big entity with lot of attributes – this means one huge java object in the back end: more the attributes in java object, the size of the object increases. So, you get Java OutOfMemory exceptions
  2. Multiple objects associated with each other – more associations then more complicated the query that is generated in the back-end. So, your query execution time will increase, which has other negative side effects as well.


Hope this explanation helps.

- Nirmal