When deleting an discovery rule these SQL requests are executed:
...
SQL (0.000846): INSERT INTO housekeeper (tablename,field,value,housekeeperid) VALUES ('trends','itemid','24294','2192')
CAPIObject->delete() > CAPIObject>__call() > czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CDiscoveryRule>delete() -> DB::insert() -> DBexecute()
SQL (0.0009): INSERT INTO housekeeper (tablename,field,value,housekeeperid) VALUES ('trends_uint','itemid','24294','2193')
CAPIObject->delete() > CAPIObject>__call() > czbxrpc::call() -> czbxrpc::callAPI() -> call_user_func() -> CDiscoveryRule>delete() -> DB::insert() -> DBexecute()
...
24294 - itemid of the discovery rule.