You need to have loop condition in some place. It would be better to move this loop condition to database side otherwise you will run in performance issues. There is...
As suggested in earlier posts drop/disable the index and try to delete the data. Instead of deleting all the records at one shot try deleting in small chunks of it....