This could be made faster by using an IN clause and passing multiple page IDs.  You'll have to check how many IDs you've got though, as MySQL has an upper limit to the text length of the query you send it.  Deleting in groups of 100 is probably fine.