Skip to content

init_sqls take too long to execute #2451

@SunahY1011

Description

@SunahY1011

When updating our CDM data, I run Achilles and connect its results to ATLAS. However, the Achilles results alone are not sufficient to register a new data source in ATLAS, since ATLAS requires additional tables that Achilles does not create.

So I attempted to create the missing tables using the SQL scripts provided in WebAPI (src/main/resources/ddl/results). After creating the tables, I inserted some initial data using the "init_%" sql files in the same directory.

However, when executing init_concept_hierarchy.sql, the script takes an excessively long time to complete.

From the logs, I found that queries for certain domains are especially slow:
• condition: 7m 30s
• measurement: 8m 59s
• observation: 8m 17s
• procedure: 9m 15s
drug_exposure: 20h 31m 54s (still running)
drug_era: 20h 31m 54s (still running)

In particular, the JOIN operations (e.g., atc5_to_atc3, atc3_to_atc1) appear to be the main bottleneck.

Could you please take a look into this issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions