Using a class-specific search can improve performance of a sweep.
When running a sweep, you can a root class search or a class-specific search.
SELECT epoch_id, object_id, content_retention_date, create_date,
version_status, object_class_id, security_id, security_folder_id,
recovery_item_id, FROM DocVersion T0 WHERE (T0.home_id IS NULL AND
(object_id > {FE0A2438-EDD7-4825-A7DA-DEDBFA204440}))
ORDER BY object_id ASC FETCH FIRST 2000 ROWS ONLY OPTIMIZE FOR
2000 ROWS
SELECT epoch_id, object_id, content_retention_date, create_date,
version_status, object_class_id, security_id, security_folder_id,
recovery_item_id FROM DocVersion T0
WHERE ((T0.object_class_id IN ({B4FDA997-1DFF-426e-AF31-616ED433F651})) and T0.home_id IS NULL
AND (object_id > {FE0A2438-EDD7-4825-A7DA-DEDBFA204440}))
ORDER BY object_id ASC FETCH FIRST 2000 ROWS ONLY OPTIMIZE FOR 2000 ROWS
Using a class-specific search where possible improves the performance of the sweep, since fewer documents are examined.
To use a class-specific search, set the Sweep Target property to the specific class, and set the Include Subclasses to true if you want subclasses to be included in the sweep, and to false if subclasses should not be included. Setting the Sweep Target and Include Subclasses properties this way results in better performance than searching all classes and using a filter expression to choose the class.