Title: Cleaning large database
Last modified: January 19, 2023

---

# Cleaning large database

 *  [LichKing](https://wordpress.org/support/users/lichking/)
 * (@lichking)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/clean-database-4/)
 * Hello. I’ve been using PVC for years now but I noticed that my database is getting
   ridiculously huge, like wp_post_views alone is 180 MB and I don’t really have
   use for very old statistics, just total views and the few latest months graphics
   and totals.
   then, after I backuped the whole database, I tried deleting the rows
   in MySQL like this`DELETE FROM wp_post_views WHERE type LIKE 1 AND period LIKE'%
   2022%';`and `DELETE FROM wp_post_views WHERE type LIKE 3 AND period LIKE '%2022%';`
   then changing the 2022 to 2020 and 2021 after the 2022 rows got deleted.It seems
   to work, but I’d like to know if this can trigger some kind of issue or if I 
   need to do something else.also, there goes a suggestion. I’m still using 1.3.7
   due to the Fast AJAX count mode. Why don’t you provide in your official website
   an add-on that enables the Fast AJAX stuff after we update to the current version
   within WordPress in the usual method?thanks for the attention.
    -  This topic was modified 3 years, 4 months ago by [LichKing](https://wordpress.org/support/users/lichking/).

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

 *  Plugin Author [dFactory](https://wordpress.org/support/users/dfactory/)
 * (@dfactory)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/clean-database-4/#post-16394220)
 * Hi,
 * Thanks for these questions.
 * Regarding the size of db table and a fix for it. 180MB sounds big but to be honest
   on a large scale website is not a lot (we’ve been working on post tables with
   larger than 20GB etc.). But anyway, there is a built in feature to do the cleanup–
   it’s called “Reset Data Interval” and the only thing it affects is the daily 
   vists data. Total visits (also the daily total visits) are never touched. So 
   just set it to a year or couple of months and it should do the cleanup automatically
   making your post views table radically smaller.
 * Regarding the Fast Ajax – you will not believe that, but we’ve been forced to
   remove that by WP Plugin Team. They stated the method we used is “not following
   WP standards” and we either remove it or the plugin will be removed from the 
   WP plugins directory. I’ve been personally argueing with them for a month explaining
   how smart that method is (and safe at the same time). But I had to give up.
 * That led us to couple of unpleasant conclusions and one of them is that eventually
   the Fast Ajax feature will be available in the upcoming Pro version of Post Views
   Counter that will have nothing to do with WP plugins directory.
 *  Thread Starter [LichKing](https://wordpress.org/support/users/lichking/)
 * (@lichking)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/clean-database-4/#post-16394859)
 * Okay. I’ll try the Reset Data Interval thing. Yeah I knew about the WordPress
   issue, but I was wondering if it was a matter of you providing some extra files
   outside wordpress for us to keep using the PVC in an updated version.
 * thanks!
 *  [abdulazizsobh](https://wordpress.org/support/users/abdulazizsobh/)
 * (@abdulazizsobh)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/clean-database-4/#post-16850197)
 * [LichKing](https://wordpress.org/support/users/lichking/)
 * Can you please reach out to me I need to talk to you about the solution you came
   up with [https://www.facebook.com/AbdulazizShobh/](https://www.facebook.com/AbdulazizShobh/)

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

The topic ‘Cleaning large database’ is closed to new replies.

 * ![](https://ps.w.org/post-views-counter/assets/icon-256x256.png?rev=2973820)
 * [Post Views Counter](https://wordpress.org/plugins/post-views-counter/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-views-counter/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-views-counter/)
 * [Active Topics](https://wordpress.org/support/plugin/post-views-counter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-views-counter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-views-counter/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [abdulazizsobh](https://wordpress.org/support/users/abdulazizsobh/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/clean-database-4/#post-16850197)
 * Status: not resolved