STOP, do not run that query from that article. That will drop your entire CM_COMPUTER_SYSTEM table.
Upgrade to 8.5.1 make use of the newly added delete function from the Inventory section in the UMP's USM. That would be the easiest way to get rid of your 500 of the 1000 you don't need.
If this is a test DB then you can follow that article but if this is prod then do not follow that article.
Alternatively you can make use of the discovery server call back and get the CS_ID of all the 500 servers you want to delete using the inventory view.
Log into UMP, USM, Inventory. Filter out the full list to just the 500 you want and then do an Action Export. The export will contain the CS_KEY's.
Take this list export it and then put them all on one line separated by a coma.
Open the discovery_servers probe utility, and use the remove_master_devices_by_cskey call back. Paste the list of cs_keys and then press play.
This will delete all the old robots out of your DB.
For QoS clean up if you need to, then open your SLM portlet. Click on the wrench icon in top right and select Preferences.
Adjust to the following:
Save and then go back. Back in the portlet go into the Quality of Service section and now you can easily navigate the QoS as you would in the IM tool. To delete specific robots just mouse over the end of an entry and do a Delete.
You can delete specific Qos from a probe or an entire probe's worth of QoS or all QoS from a specific Robot.
This can take a long time so do it 1x1.