We’re running Achilles against a PostgreSQL CDM (~4M rows in observation_period) and have a few questions:
Analyses 117, 1409, 1410, etc. normally run in ~18 seconds but sometimes take an hour or more. The query plan shows 1B+ estimated intermediate rows from a range join on a computed expression, which a standard index doesn’t help with. Has anyone found an effective indexing approach?
On long-running analyses, the connection sometimes disappears from pg_stat_activity with no error - possibly statement_timeout or a network/firewall timeout. Has anyone run into this?
Using numThreads fails with: “Unable to evaluate the ‘server’ argument… connection is being established in a separate R thread…” Has anyone encountered this error?
Hi @Jaya ! I can help with the last one: Connection details as created by createConnectionDetails() do not store the secret values in memory. Instead, they store the expressions, and only evaluate them when connecting. That does require that the expression can be evaluated in the environment where the connection is made. If you use multi-threading, local variables will not be available.
Hello All,
I am a co-worker with Jaya and appreciate the Reponse.
If we cannot seem to address these database connection issues Can we run Achilles manually?
It is my understanding that we can do this:
Run Achilles with the “sqlonly” parameter that will generate an achilles.sql for our database type (postgres)
We can then run that entire set of sql commands independent of the R packages and end with the same final results into 2 files: achilles_results_dist, and achilles_results