Welcome to the part of OHDSI that has a few warts Have we scared you yet?
I also have this problem on my databases. @anthonysena designed the package. He gave me the following advice: Build indices on the drug_source_concept_id and condition_source_concept_ids.
Why? CohortDiagnostics is the library that underpins this package. It’s greedy and looks across your source_concept_ids in CONDITION_OCCURRENCE and DRUG_EXPOSURE. This is essentially what RunDiagnostics is doing. It’s what leads to the Diagnostics Shiny Apps for COVID cohort definitions, Flu cohort definitions, the Stratification criteria we’ve created and any custom features we’ve defined.
I’m told this should really help.
If you continue to face problems, let us know. We are about to embark on Charybdis 2.0 which includes amending our current protocol with new questions that fit into the characterization framework. We will also be revisiting the Charybdis package code for optimization.
BTW, I forgot to ask… what dialect of SQL are you using?