Skip to content

Instantly share code, notes, and snippets.

@surister
Last active March 17, 2025 18:23
Show Gist options
  • Select an option

  • Save surister/5f568cbe8775b2a18a284ab307f73f6b to your computer and use it in GitHub Desktop.

Select an option

Save surister/5f568cbe8775b2a18a284ab307f73f6b to your computer and use it in GitHub Desktop.
Crate UUID overhaul.

Right now CrateDB has ..

What other databases are doing:

  • postgres: In postgres 18, uuid4() (RFC), uuid7(rfc), gen_random_uuid() (uuid4 RFC)1
  • tinybird: generateUUIDv4() (RFC) and clickhouse2
  • cockroachdb: gen_random_uuid, uuid_v4 (RFC) and unique_rowid (timebased sortable)3
  • singlestore: UUID4 (RFC)4
  • firebase: UUID4, custom token (timebased sortable)5
  • elasticsearch: elasticflake (like us), k-ordered (timebased sortable)

Footnotes

  1. https://docs.singlestore.com/cloud/reference/sql-reference/identifier-generation-functions/sys-guid-and-uuid/

  2. https://clickhouse.com/docs/sql-reference/data-types/uuid

  3. https://www.cockroachlabs.com/docs/stable/uuid#create-a-table-with-auto-generated-unique-row-ids

  4. https://docs.singlestore.com/cloud/reference/sql-reference/identifier-generation-functions/sys-guid-and-uuid/

  5. https://pgpedia.info/postgresql-versions/postgresql-18.html https://firebase.blog/posts/2015/02/the-2120-ways-to-ensure-unique_68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment