Tip 2: Replace UUID with SnowflakeID
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. https://en.wikipedia.org/wiki/Universally_unique_identifier
UUIDs are commonly used as additional identifiers for objects in addition to internal ids generated by Mendix. The advantage of UUIDs is that they can be generated/sent by external systems. These UUIDs can then be used to soft-link objects together or refer to object from external systems.
Unfortunately, Mendix does not support a special UUID type, unlike most database schemas. So UUIDs are stored as strings which is not very efficient memory-wise. But even more importantly, indexing and retrieving strings is 2–5 times slower than equivalent UUID types (PostgreSQL).
The solution we went for is to replace UUIDs with SnowflakeIDs. These are unique ids similar to UUIDs, but only 64 bit in length (instead of 128 bit for UUID). This means they can be stored in a
bigint (long) column. This resulted in 10 times faster data retrieves on average in our project.”
apparently autoNr is not a string.