This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-08
Channels
- # announcements (5)
- # babashka (46)
- # beginners (206)
- # boot (1)
- # bristol-clojurians (1)
- # calva (9)
- # chlorine-clover (27)
- # cider (1)
- # clara (10)
- # clj-kondo (105)
- # cljsrn (2)
- # clojars (1)
- # clojure (104)
- # clojure-europe (6)
- # clojure-nl (2)
- # clojure-uk (18)
- # clojurescript (44)
- # conjure (10)
- # core-async (34)
- # cursive (28)
- # data-science (6)
- # datomic (14)
- # emacs (44)
- # events (1)
- # figwheel-main (1)
- # fulcro (13)
- # graphql (9)
- # helix (12)
- # kaocha (2)
- # meander (4)
- # off-topic (2)
- # pathom (1)
- # quil (1)
- # re-frame (21)
- # shadow-cljs (49)
- # spacemacs (6)
- # xtdb (8)
Hi! What if one wanted to use another randomly generated unique IDs (e.g. nano-id) instead of UUIDs, would Datomic lookup them as fast as UUID?
Speed probably isn’t going to differ that much. Uuids have a space-efficient encoding in fressian and transit and are compactly represented in java. An alternative id scheme will have to be represented as a string
Thanks for pointing to representation and transferring data, just didn’t think about it. However, the main question about lookup speed is still opened.
again, it’s unlikely to make a difference, except insofar as things with smaller representations in memory tend to be faster
if speed is absolutely critical you should benchmark, but my hunch is it doesn’t matter
Thanks a lot.
How can I convert a datom like
#datom[49011830319782294 186 #uuid”c3fc44ab-44a2-4e66-b095-bfe0dc200806" 13194140498706 false] into the vector of data it contains?