auto nr vs UUID/GUID

0
for the drag-and-drop implementation, each object needs a unique ID. can I use auto nr for this, or does it need to be a crazy string for security reasons? does auto nr ever repeat (known glitches)? can UUIDs accidentally be reused on different objects? and does this matter?   just trying to find the easiest way to make a UUID
asked
2 answers
1

https://medium.com/mendix/five-tips-for-working-with-large-database-tables-in-mendix-170210f6f6fd

 

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.”

answered
0

apparently autoNr is not a string.

 

answered