-
Patch request
-
Resolution: Unresolved
-
Trivial
-
None
-
7.0.17, 7.4.3rc1
-
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