This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-20
Channels
- # aleph (1)
- # announcements (1)
- # aws (11)
- # babashka (117)
- # beginners (34)
- # calva (13)
- # cider (3)
- # clj-commons (8)
- # clj-kondo (24)
- # clj-yaml (36)
- # cljsrn (46)
- # clojure (50)
- # clojure-australia (5)
- # clojure-europe (239)
- # clojure-nl (3)
- # clojure-norway (3)
- # clojure-spec (16)
- # clojurescript (25)
- # core-typed (20)
- # cursive (41)
- # datahike (1)
- # datalevin (1)
- # datomic (17)
- # fulcro (27)
- # hyperfiddle (35)
- # introduce-yourself (1)
- # jobs (4)
- # lsp (20)
- # malli (8)
- # meander (8)
- # nbb (1)
- # off-topic (31)
- # parinfer (9)
- # pathom (3)
- # portal (2)
- # re-frame (20)
- # react (2)
- # reagent (8)
- # releases (1)
- # remote-jobs (4)
- # scittle (2)
- # shadow-cljs (8)
- # slack-help (4)
- # sql (30)
- # squint (3)
- # tools-deps (34)
- # xtdb (21)
I just want to make sure my testing is correct here: You can't use db-stats together with d/as-of to get a picture of earlier datom counts, correct?
I don't think so. db-stats is the stats of the index, and there's only one index at a time
it is a great description for a index-stats
function. 👀
The db in the past uses only a subset of the index, so db-stats should respect this subset, imho.
but to do this it has to descend into the "leaves" of the tree instead of just walking the index nodes
you can efficiently give stats for a particular index tier (e.g. all of history, or all of the "now"), but not for subsets of one, which is what as-of/since can do
@U09R86PA4 thanks. Out of curiosity, if you needed to compute the rate of growth of a set of attributes would you use the datoms api or trawl the tx-log? I've implemented my own db-stats using d/datoms that respects as-of+history, but it just takes forever, even though I'm just getting a count for every month the database has been in operation.
I'm guessing that I'm doing a lot of double counting since I'm running the computation for each month. Probably would be more efficient to trawl the tx-log, no?
Depends on exactly what you are measuring and why. If you are just looking at a few attr and are mostly interested in index size or churn or sth like that, I'd d/datoms aevt once over an unfiltered history db and bucket by tx myself. You can compute tx intervals for time using avet of db/txInstant
If you want everything, or you want to include unindexed info (eg noHistory attr churn) I'd use tx range directly
Oh, lordy -- bucket by tx -- I'm embarrassed for not thinking of that! Thanks @U09R86PA4!!!