Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9893

Alarm Clear Trigger query language performance improvement

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Meridian-2015.1.8
    • Fix Version/s: 24.0.0
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
    • Sprint:
      Horizon - April 10th 2019

      Description

      This is a performance improvement to one of the most used queries in the system and critical to the current process of clearing Alarms:

      Change:

            <statement>
              SELECT *, now() AS _ts FROM alarms as problems
              WHERE alarmType=1
                AND severity &gt; 2
                AND reductionKey IN (SELECT clearKey FROM alarms WHERE alarmType=2 AND lastEventTime &gt; problems.lastEventTime)
            </statement>
      
      

      To:

      <statement>
      SELECT A1.*, now() AS _ts FROM alarms A1
        JOIN alarms A2 
          ON A1.reductionkey=A2.clearkey 
       WHERE A1.alarmType=1 
         AND A1.severity &gt; 2
         AND A2.alarmType=2 
         AND A2.lastEventTime &gt; A1.lastEventTime
      </statement>

        Attachments

          Activity

            People

            • Assignee:
              cpape Christian Pape
              Reporter:
              david David Hustace
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: