Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-1948

Speed up fetching cohorts of patients (will speed up the logic module)

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 1.8.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      Currently calling PatientSetService.getPatients(set of N patient ids) causes 3N + 1 sql selects. We should either:

      • change the Person.hbm.xml mapping to force joins on names, addresses, and attributes
      • give a hint in HibernatePatientSetDAO.getPatients(Collection<Integer>) to force a join

      This is being discussed here:
      http://openmrs-mailing-list-archives.1560443.n2.nabble.com/slow-performance-of-hibernate-lazy-false-tp5919508p5919508.html

        Attachments

        1. PatientSetJoin.patch
          0.9 kB
        2. trunk-1948Update.patch
          0.9 kB

          Activity

            People

            Assignee:
            darius Darius Jazayeri
            Reporter:
            darius Darius Jazayeri
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: