diff --git a/doc/82-Changelog.md b/doc/82-Changelog.md index 0de5b8d8..a6eb1720 100644 --- a/doc/82-Changelog.md +++ b/doc/82-Changelog.md @@ -28,6 +28,7 @@ before switching to a new version. * FIX: Sync is very powerful and allows for actions not available in the GUI. It however allowed to store invalid single Service Objects with no Host. This is now illegal, as it never makes any sense +* FIX: Performance boost for "purge" on older MySQL/MariaDB systems (#1475) * FEATURE: new Property Modifier for IPs formatted as number in Excel files (#1296) * FEATURE: new Property Modifier to url-encode values * FEATURE: new Property Modifier: uppercase the first character of each word diff --git a/library/Director/Import/PurgeStrategy/ImportRunBasedPurgeStrategy.php b/library/Director/Import/PurgeStrategy/ImportRunBasedPurgeStrategy.php index c48acedf..16f2a8cc 100644 --- a/library/Director/Import/PurgeStrategy/ImportRunBasedPurgeStrategy.php +++ b/library/Director/Import/PurgeStrategy/ImportRunBasedPurgeStrategy.php @@ -58,11 +58,7 @@ class ImportRunBasedPurgeStrategy extends PurgeStrategy $query = $db->select()->from( array('a' => $selectA), 'a.object_name' - )->joinLeft( - array('b' => $selectB), - 'a.object_name = b.object_name', - array() - )->where('b.object_name IS NULL'); + )->where('a.object_name NOT IN (?)', $selectB); $result = $db->fetchCol($query);