Add support for ULIDs - CreateULID()

Universally Unique Lexicographically Sortable Identifier

Basically, a high performance alternative to UUIDs

Proposal, POC and more info on the ticket, plz comment here, not on the ticket

https://luceeserver.atlassian.net/browse/LDEV-4481

4 Likes

been doing some initial testing, not seeing any huge performance benefits

however, the test tables with a ULID are 33% smaller than the UUID tables!!

EDIT: OMG


1 Like

Sounds nice. The only problem that could exists under certain circumstances: You want anonymous data records (like a vote or survey) and with the timestamp you could match the logins from users.

Would you migrate the code von CreateUUID() or would you make a switch/checkbox in the Application-Scope how the ID would be created?

createUUID isn’t going away, for exactly the reasons you highlighted

this would be an elective choice within your application, should you decide to use it

3 Likes

MySQL have a specific datatype for ULID?

PostgreSQL have a specific datatype for UUID; it performs 50% better than a normal char datatype.

Check out an article by @bennadel about using cuid2:

And the cuid2 readme itself:

It is a fascinating read.

2 Likes

I have created a sample extension

here’s a sample extension

ulid-extension-0.0.0.1-SNAPSHOT.lex (24.2 KB)

3 Likes