Expensive aggregate query in CMDB Get Well Metric Collection jobDescriptionInefficient queries from daily job: "CMDB Get Well Metric Collection" causing DB CPU to spikeSteps to Reproduce On customer's instance (~1 billion records)Issue Definition: - Issue 1 - EXPENSIVE aggregate query on sys_object_source table where target table are children of CMDB_CI_VM_INSTANCE and CMDB_CI_HARDWARE which ran for more than 4 hours.- Issue 2 - EXPENSIVE aggregate query on cmdb_rel_ci table to find orphaned rels ran for 1hr 17 min.Steps to Reproduce: Run the Job "CMDB Get Well Metric Collection"WorkaroundFor "CMDB Get Well Metric Collection" scheduled job WORKAROUND:- Goto the following scheduled job:https://<instance_name>.service-now.com/nav_to.do?uri=sysauto_script.do?sys_id=d4a09b6653b8501032b7ddeeff7b12c7 - Comment out lines 5 and 7 For "CSDM Get Well Metric Collection" scheduled job WORKAROUND: 1. goto the scheduled job: https://<instance_name>.service-now.com/nav_to.do?uri=sysauto.do?sys_id=a0b393e653b8501032b7ddeeff7b1269 2.comment out line 15Related Problem: PRB1553457