Title: Reducing the database size
Last modified: August 20, 2016

---

# Reducing the database size

 *  [princejindal8](https://wordpress.org/support/users/princejindal8/)
 * (@princejindal8)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/reducing-the-database-size/)
 * Hi
 * Is it safe to run the following query to clean up my wp_commentmeta table of 
   my database?
 * DELETE FROM wp_commentmeta WHERE comment_id NOT IN (SELECT comment_id FROM wp_comments)
 * Would it cause any problem or is it safe to run this query?
    My Akismet plugin
   continues to add statistical data to this table and so my database has grown 
   large and my web host is throttling my account multiple hours a day, being on
   a pro account.
 * So, I thought of firstly cleaning the database, and I found the above query. 
   Please, let me know, if it is safe to run the above query on my database?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/reducing-the-database-size/#post-3592922)
 * Try this pluig to clean and optimize DB: [http://wordpress.org/extend/plugins/rvg-optimize-database/](http://wordpress.org/extend/plugins/rvg-optimize-database/)
 * **Always backup everything (including your database) before doing any actions,
   just in case.**
 *  Thread Starter [princejindal8](https://wordpress.org/support/users/princejindal8/)
 * (@princejindal8)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/reducing-the-database-size/#post-3592926)
 * Thanks t-p.
    I will try that. Hope it solves the problem.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Reducing the database size’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [princejindal8](https://wordpress.org/support/users/princejindal8/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/reducing-the-database-size/#post-3592926)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
