{"action":"created","issue":{"url":"https://api.github.com/repos/lesterchan/wp-sweep/issues/1","labels_url":"https://api.github.com/repos/lesterchan/wp-sweep/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/lesterchan/wp-sweep/issues/1/comments","events_url":"https://api.github.com/repos/lesterchan/wp-sweep/issues/1/events","html_url":"https://github.com/lesterchan/wp-sweep/issues/1","id":58882790,"number":1,"title":"Orphaned Term Relationship are not deleted","user":{"login":"slaFFik","id":282234,"avatar_url":"https://avatars.githubusercontent.com/u/282234?v=3","gravatar_id":"","url":"https://api.github.com/users/slaFFik","html_url":"https://github.com/slaFFik","followers_url":"https://api.github.com/users/slaFFik/followers","following_url":"https://api.github.com/users/slaFFik/following{/other_user}","gists_url":"https://api.github.com/users/slaFFik/gists{/gist_id}","starred_url":"https://api.github.com/users/slaFFik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slaFFik/subscriptions","organizations_url":"https://api.github.com/users/slaFFik/orgs","repos_url":"https://api.github.com/users/slaFFik/repos","events_url":"https://api.github.com/users/slaFFik/events{/privacy}","received_events_url":"https://api.github.com/users/slaFFik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-25T10:45:16Z","updated_at":"2015-02-25T11:08:07Z","closed_at":null,"body":"At all. Doing something quite long.\r\n\r\nThan shows this messages: `8 Orphaned Term Relationships Processed`\r\nAlthough in a table I see this: `Orphaned Term Relationship - 8003`\r\n\r\nInitially posted here: https://wordpress.org/support/topic/orphaned-term-relationship-are-not-deleted?replies=1"},"comment":{"url":"https://api.github.com/repos/lesterchan/wp-sweep/issues/comments/75942773","html_url":"https://github.com/lesterchan/wp-sweep/issues/1#issuecomment-75942773","issue_url":"https://api.github.com/repos/lesterchan/wp-sweep/issues/1","id":75942773,"user":{"login":"lesterchan","id":355829,"avatar_url":"https://avatars.githubusercontent.com/u/355829?v=3","gravatar_id":"","url":"https://api.github.com/users/lesterchan","html_url":"https://github.com/lesterchan","followers_url":"https://api.github.com/users/lesterchan/followers","following_url":"https://api.github.com/users/lesterchan/following{/other_user}","gists_url":"https://api.github.com/users/lesterchan/gists{/gist_id}","starred_url":"https://api.github.com/users/lesterchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesterchan/subscriptions","organizations_url":"https://api.github.com/users/lesterchan/orgs","repos_url":"https://api.github.com/users/lesterchan/repos","events_url":"https://api.github.com/users/lesterchan/events{/privacy}","received_events_url":"https://api.github.com/users/lesterchan/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T11:08:07Z","updated_at":"2015-02-25T11:08:07Z","body":"Let's discuss it over here. It works fine on my host but I only tested on one site since I don't have access to it\r\n\r\nIt takes a long time for huge sites because it does a sub query. If you click Sweep a couple of times, does it process the remaining one or it is stuck at 8003?\r\n\r\nCan you run this query and tell me the output?\r\n```sql\r\nSELECT tr.object_id, tr.term_taxonomy_id, tt.taxonomy FROM$wp_term_relationships AS tr INNER JOIN wp_term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy != 'link_category' AND tr.object_id NOT IN (SELECT ID FROM wp_posts) LIMIT 100;\r\n```"}}