-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cohort Definition List query joins to CohortDetails #219
Comments
Reopening issue due to regression. Getting the cohort definition list is joining to the details table, which results in excessive bandwidth against the database. The query reported when accessing /WebAPI/cohortdefinition:
Note the 'expression' column being returned and the join to ohdsi.cohort_definition_details. Because this has regressed a few times, let me explain why we do not want to return the expression column: The expression column contains the cohort expression which could be several megabytes of json text which is streamed out of the database to the WebAPI layer, but ultimately is not even used in the response. This causes large delays over our network (several thousand cohort definitions in the list would result in gigabytes of transfer). And, incase anyone is wondering, server side paging will not address this, the data should not be returned in the first place. |
Expected behavior
Querying for cohort definition list should not include columns (especially large columns) that are not required for the cohort definition list view.
Actual behavior
When querying the cohort definition list, the JPQL generated causes a inner join to CohortDefinitionDetails and pulls in the VARCHAR(MAX) column. This has negative performance impacts, and has even causes queries to hang on our EC2 sql server instances.
Steps to reproduce behavior
The text was updated successfully, but these errors were encountered: