Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26917

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

XMLWordPrintable

    • Icon: Patch request Patch request
    • Resolution: Unresolved
    • Icon: Trivial Trivial
    • None
    • 7.0.17, 7.4.3rc1
    • Agent2 plugin (G)
    • 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

       

            zit Zabbix Integration Team
            slefevre01 seb lefevre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: