Finding associated IPs for cloud schedules causes poor performance in Shazzam


Description

In Paris, we've shipped an enhancement that considers not just Public IP, for Deep Discovery post-Cloud Discovery of Cloud Schedule, but to consider even the Private IPs. Some of the queries are added in the script include - "CloudDiscoveryScheduleConfig".

In the process of adding the changes w.r.t above enhancement, the way the queries are written, the sequence of triggering them, and having no index for object_id column in cmdb_ci._nic table is causing performance issues that are impacting the Shazzam thus leading to poor performance.

Steps to Reproduce

Regular Cloud + IP Discovery with huge number of VM Instances should be enough.

Workaround

https://community.servicenow.com/community?id=community_article&sys_id=93f2bd0cdb18381413b5fb24399619b1


Related Problem: PRB1495931