I'm using SSIS 2012 on SQL 2012 SP1 and the performance of the SSIS Server Maintenance Job is abysmal. It's been running for 10 days and has still not completed. Worse still it is blocking the other packages.
The maintenance job is stuck deleting data from the internal.operations table in the internal.cleanup_server_retention_window procedure. The table only has 166,000 rows! This is the delete statement that is causing the problem.
DELETE TOP (@delete_batch_size) FROM [internal].[operations] OUTPUT DELETED.operation_id, DELETED.operation_type INTO @deleted_ops WHERE ( [end_time] <= @temp_date OR ([end_time] IS NULL AND [status] = 1 AND [created_time] <= @temp_date ))
The other jobs are being blocked when attempting to insert into the internal.operations table in the internal.append_event_message procedure. This is affecting the performance of the packages.
INSERT INTO [internal].[event_messages] ([operation_id], [event_message_id], [package_name], [package_location_type], [package_path_full], [event_name], [message_source_name], [message_source_id], [subcomponent_name], [package_path], [execution_path], [threadID], [message_code]) VALUES ( @operation_id, @operation_message_id, @package_name, @package_location_type, @package_path_full, @event_name, @message_source_name, @message_source_id, @subcomponent_name, @package_path, @execution_path, @thread_id, @message_code )
I am using SQL agent to execute 11 different packages every minute. This process works fine on both SQL2005 & SQL2008. I searched the forums but didn't see any fixes or workarounds for this issue. Has anyone else experience a problem with the SSIS server maintenance job? Do you have any fixes/workarounds for this issue?
The query plan for the delete shows why it performs so poorly - I guess I could add indexes to support the foreign key constrains in the related tables.
Thanks,
Tim