This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-09
Channels
- # announcements (9)
- # beginners (69)
- # cider (4)
- # clj-kondo (8)
- # cljdoc (1)
- # clojure (52)
- # clojure-austin (4)
- # clojure-europe (22)
- # clojure-nl (2)
- # clojure-norway (14)
- # clojure-uk (3)
- # clojurescript (9)
- # conjure (4)
- # cursive (3)
- # datalevin (13)
- # datomic (4)
- # events (2)
- # fulcro (59)
- # graalvm (17)
- # helix (25)
- # inf-clojure (4)
- # integrant (4)
- # introduce-yourself (2)
- # java (5)
- # kaocha (1)
- # leiningen (3)
- # meander (7)
- # nbb (4)
- # off-topic (30)
- # portal (4)
- # rdf (1)
- # reagent (5)
- # sci (1)
- # shadow-cljs (57)
- # sql (8)
- # tools-deps (39)
- # uncomplicate (3)
- # vim (3)
- # xtdb (8)
Another perspective on explicit Datalog term order. I had a query that ran fast and returned a few things too many. I added one teeny-tiny term to the where clause, just to filter the results that had already been obtained. But the query then took seemingly infinite time.
Hey @U0HG4EHMH was the filter a <
or >
predicate, out of interest?
If you can share the query that would be really helpful. We are keen to make sure the query planner is both reliable and generally useful, so understanding the scenarios in which it makes the wrong assumptions is important for us to make the experience nicer.
The additional "teeny-tiny" term was [e a v], and the attribute (and that particular value for the attribute) were very common throughout the documents. So I worked around it by making the query pull that attribute and programming a post-query filter.
The query also involved a recursive rule that traced attributes that were not very common in the data. If I squint, I can imagine the planner thinking "OMG recursion, this other thing is simpler, maybe I'll start with the simple part"