Fork me on GitHub
#datomic
<
2021-03-12
>
kenny01:03:46

Do the datoms in a transaction from a call to d/tx-range have any particular order?

ghadi01:03:48

I don’t think so

ghadi01:03:34

I was writing a transaction splitter for a decanting routine, and I remember explicitly sorting a tx by retractions first, then assertions

3
zendevil.eth16:03:48

I’m running the following command:

./datomic client access my-stack-name
But I’m getting the following error:

zendevil.eth16:03:54

Execution error (ExceptionInfo) at datomic.tools.ops.aws/invoke! (aws.clj:83).
AWS Error: Unable to fetch region.

zendevil.eth16:03:59

How to fix this?

jaret17:03:33

Hi @ps do you have AWS credentials sourced? Datomic utilizes the sourced or specified https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html to operate. The CLI tools allow you to also pass a aws profile https://docs.datomic.com/cloud/operation/cli-tools.html#gen-opts

joshkh19:03:41

to test the performance of a query, i'd like to run it a few times while avoiding any caching effects. is it just a matter of using unique binding names in each execution? https://docs.datomic.com/cloud/query/query-executing.html#query-caching

Joe Lane19:03:23

@joshkh It sounds like you're attempting to test the performance of the query-as-edn->datalog-engine-format calculation. Are you suspecting that is a problem for you?

joshkh20:03:22

thanks for the reply. to be completely transparent i don't know much about the various layers of caching. the problem i'm trying to solve is that i have a handful of queries that perform badly, and better on subsequent executions. while debugging i don't know if my reordering of the constraints is actually helping or if caching is just doing its job.

Joe Lane20:03:46

I think it is highly unlikely that query-caching is what you're seeing. More likely, the data is not in the object-cache / valcache / memcached on the first run and have to be fetched from storage. Upon subsequent runs, the queries have the data in all of those caching layers and therefore is mostly CPU bound (what you want) instead of io bound (not what you want).

joshkh20:03:20

yup, that makes sense. thanks for clarifying. i had a feeling it wasn't as simple as caching query results based on how the query is compiled.