When you override and disable a discovery for a class in SCOM you may notice that objects may persist in the database. For example if you exclude a SQL database after initial SQL DB discovery it will probably still appear in the console.
To clean up the objects you can run the Remove-SCOMDisabledClassInstance Powershell cmdlet. Then all the relationships that involve objects related to a disabled discovery is deleted.
Depending on your environment, this process can take some time and put load on your SQL server.