When you allow comments in your blog post or page, often you will be spammed with thousands of comments from spammers. One way to reduse it to use module like CAPTCHA.
IF you already have thousands of comments to your posts and would like to remove all the un approved comments here is the method.
- Enable the PHP format in your site
- Create a new content page and add the following code
- Select your text format as PHP code
- Save
- Reload the page
That should run the php code and remove all the un approved comments from your database.
Bulk delete of unapproved comments in drupal 7