Tuning SQL Server Change Data Capture
-
Ensure that Auto Create Statistics and Auto Update Statistics are enabled for the database. Maintaining statistics on the
cdc.OracleGG_#####_CT
,cdc.lsn_time_mapping
, andOracleGGTranTables
table is crucial to the performance and latency of the Extract. -
The SQL Server Change Data Capture job collects data from the SQL Server transaction log and loads it into the Change Data Capture staging tables within the database.
As part of the job that is created, there are several available tuning parameters that can be used, and information on how to best tune the job can be found in the following article: https://technet.microsoft.com/en-us/library/dd266396(v=sql.100).aspx
As a general recommendation, you should change the SQL Server Change Data Capture Job polling interval from the default of 5 seconds to 1 second.
To change the default polling interval of the CDC Capture job, execute the following queries against the database:
EXEC [sys].[sp_cdc_change_job] @job_type = N'capture’, @pollinginterval = 1, GO, --stops cdc job EXEC [sys].[sp_cdc_stop_job], @job_type = N'capture’, GO, --restarts cdc job for new polling interval to take affect EXEC [sys].[sp_cdc_start_job], @job_type = N'capture’,