plugin mssql, timeout issue with item get_last_backup. Need query optimization

XMLWordPrintable

    • Type: Patch request
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.17, 7.4.3rc1
    • Component/s: Agent2 plugin (G)
    • Environment:
      windows/mssql

      Hi,
      the query used in the mssql plugin to report the latest backups (file "last.backup.get.sql"), is not optimized. 
      It can take several seconds(/minutes) to run on Alwayson clusters having many databases and availability groups.

      The "NOT IN" can cause problems if NULL appears. It is advisable to replace it with a "LEFT JOIN ... WHERE IS NULL", which is more efficient and secure.

      Attached is an optimization of this request. The result is instantaneous.

      Best Regards

      Sébastien

       

            Assignee:
            Zabbix Integration Team
            Reporter:
            seb lefevre
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: