Uploaded image for project: 'Syncope'
  1. Syncope
  2. SYNCOPE-408

Add index on task.executed

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1.3
    • 1.1.4, 1.2.0-M1
    • core
    • None

    Description

      In our Syncope installation (1.1.3 on Tomcat/MySQL) we observed long execution times (>1s) for TaskDAO.findToExec(), which is called periodically from NotificationJob to determine which notifications should be sent.

      According to our analysis, this is due to the fact that TaskDAO.findToExec() performs a full scan on all entries of the task table with DTYPE="NotificationTask" (which could be a large number as all executed tasks are kept), although only very few tasks are selected (those with executed=0).

      Creating an index on task.executed solved this problem; attached is a corresponding patch against the branch 1.1.X.

      Attachments

        1. indexes.xml.patch
          0.7 kB
          Guido Wimmel

        Activity

          People

            ilgrosso Francesco Chicchiriccò
            gwimmel Guido Wimmel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: