Too many inserts into 'discovery_cloud_temp_results' for static data contributing to Replication LagDescriptionIn some customer instances, we notice DB replication lag issues due to huge data in cloud discovery tables like cmdb_ci_compute_template, cmdb_ci_os_template. This is caused by a CloudResourceDiscoveryCountHandler script to record cloud resource count into the 'Discovery Cloud Results' table during a Discovery triggered via CAPI or Non-CAPI calls, which is used to show cloud discovery in the dashboard.Steps to Reproduce 1. have db replication2. Have 30 nodes in a cluster3. Have thousands of Service Accounts4. Configure 1 disco schedule for EACH service account5. Run the schedules at close intervalsWorkaroundAs a workaround, we can exclude a cloud resource count of the given tables to insert into the 'Discovery Cloud Results' table during Cloud Discovery (Pattern or CAPI). This will only impact the cloud dashboard, ie. Dashboard will not reflect the count of the excluded resources. To exclude a table from this logic, either add the table name to the property 'glide.discovery.cloud_discovery_result.tables_to_exclude' or add the table name to the 'excludedCIsList' variable in 'CloudResourceDiscoveryCountHandler' script include.Related Problem: PRB1839235