This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Anyone have any recommended techniques for troubleshooting non-performant datalog queries?
I've used a lot of the common practices of starting with the most restrictive where clauses, but am seeing some issues when "joins" are in effect
@gurdas: If you share a copy of the query (or an analogous query against a toy schema or something like https://github.com/Datomic/mbrainz-sample ) I can take a look tomorrow or Monday (not staying on much longer tonight).
(of course, someone else might be able to help in the mean time)
are you using any comparison predicates on unindexed attributes (or on a version of Datomic prior to avet optimizations w/comparison predicates in query), or log or history database values in the query?
Thanks @bkamphaus , It's basically an OLAP style reporting db, that has a few hierarchical "dimensions" that slice/aggregate a lot of individual facts. For instance in this query the dimensions are known as "trees", and the nodes have on the order of a few thousand "lines" of financial data that needs to be aggregated up to them; a query for retrieving a count of all lines in a tree would look like this (this executes in ~60ms against 100k+ lines, and around 600 nodes)
[:find (count ?l)
:where
[?t :tree/id "someid"]
[?n :node/tree ?t]
[?l :line/nodes ?n]]
Lines are grouped into datasets too, so when I try to group the resulting lines by dataset (to get line count by dataset):
[:find ?ds (count ?l)
:where
[?t :tree/id "someid"]
[?n :node/tree ?t]
[?l :line/nodes ?n]
[?l :line/dataset ?ds]]
Query time shoots up to ~300 msHello, I am following the datomic tutorial, trying to start the console and I get :
ā datomic-pro-0.9.5327 bin/console -p 8080 dev datomic:
Exception in thread "main" java.lang.IllegalAccessError: tried to access method clojure.lang.RT.classForNameNonLoading(Ljava/lang/String;)Ljava/lang/Class; from class datomic.console.error$loading__5340__auto____1
What could it be ?I started the transactor in another console :
ā datomic-pro-0.9.5327 bin/transactor config/samples/dev-transactor-template.properties
Launching with Java options -server -Xms1g -Xmx1g -XX:+UseG1GC -XX:MaxGCPauseMillis=50
Starting datomic:, storing data in: data ...
System started datomic:, storing data in: data
`it's a bug with version 0.9.5327 of Datomic
If you're just trying out the datomic tutorial I would recommend just downloading version 0.9.5302 and using that
or else I think you can download a working version of the console in isolation and run it against version 0.9.5327
for the most part it's pretty stable. I don't really use the console so can't say for sure whether or not there's usually bugs with it
Ok thanks, I am just getting my feet wet with datomic. I'm sold on the general idea of course
haha yup, welcome to Clojure. Works great in conference talks, a little trickier in the real world.
aha yes I spent quite a few hours making a nice setup, and looks like the foundations of my app will take a little time too