This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-11
Channels
- # announcements (1)
- # beginners (67)
- # calva (4)
- # cider (6)
- # clj-kondo (26)
- # clojure (61)
- # clojure-belgium (2)
- # clojure-sweden (1)
- # clojurescript (12)
- # community-development (27)
- # cursive (2)
- # datascript (4)
- # datomic (20)
- # emacs (4)
- # funcool (1)
- # graphql (11)
- # honeysql (3)
- # malli (15)
- # membrane (6)
- # nbb (4)
- # nextjournal (7)
- # pathom (8)
- # polylith (7)
- # rdf (1)
- # re-frame (1)
- # releases (2)
- # shadow-cljs (42)
- # specter (3)
- # tools-deps (25)
- # xtdb (17)
Hi, we want to partition datomic by patients- because most of queries will hit one patient - is there way to hint db to do this?
Assign each patient one randomly and evenly (eg with a hash function of something stable like a patient number)
Now any time you make a new entity, use d/tempid, use the partition belonging to the patient that the entity “belongs to” for partitioning purposes
It’s very much a “roll your own” system entirely in the application code. Datomic doesn’t care about partitioning at the data level; it’s just to get better segment locality at the storage level
Partitions only help when your working set and object cache are significantly smaller than your entire db
My dream was - each patient is a partition, < 1sec cold start from S3 archived blocks to get pt datoms in memory
Partitions are not hard boundaries, they just influence sort order to increase locality