Uploaded image for project: 'Reporting Module'
  1. Reporting Module
  2. REPORT-474

Speed up queries with large base cohorts

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: Reporting 0.8.2
    • Fix Version/s: Reporting 0.9.0
    • Component/s: General Architecture
    • Labels:
      None
    • Complexity:
      Medium

      Description

      Right now, most of the evaluators and DAO methods utilize the base cohort by simply appending an "in" clause to the end of the SQL or HQL query - where patientId in (:patientIds). It definitely seems like this number has a practical limit in terms of when it goes from usable to unusable to falling over.

      One solution I have been hoping to discuss on a design call, or do a spike on, is investigating the use of either the cohort/cohort_member tables, or temporary tables that are created at the start of an evaluation and dropped at the end of an evaluation, inserting the patient ids for the base cohort into these tables, and then changing our code such that we do not do "in" clauses, but rather do a join against this table.

      We should investigate this approach as well as other suggestions as to how to improve performance in this area.

        Attachments

          Activity

            People

            Assignee:
            mseaton Mike Seaton
            Reporter:
            mseaton Mike Seaton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: