Title: The impression data over time is creating a large database. Is there a solution
Last modified: August 30, 2016

---

# The impression data over time is creating a large database. Is there a solution

 *  [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/)
 * Hi Ajay,
 * I’ve been using your plugin for a few years. I really enjoy keeping track of 
   which articles have more hits than others, so the impressions have been useful
   in the WordPress panel.
 * The database has becoming very large. 200MB, and 143MB related with Top 10 plugin.
   Is there some way to delete impressions to older articles (like from a 1 or 2
   years ago) but keep it active on the recent posts? Instead of a full reset which
   one loses all data.
 * I look forward to your response. Thank you.
 * [https://wordpress.org/plugins/top-10/](https://wordpress.org/plugins/top-10/)

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

 *  Plugin Author [WebberZone](https://wordpress.org/support/users/webberzone/)
 * (@webberzone)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565498)
 * You can turn on the maintenance mode which will delete all daily posts data older
   than 90 days.
 * You can also use the new interface in the admin area to delete posts counts data
   you don’t wish to retain.
 *  Thread Starter [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565500)
 * Hi,
 * Is there any way to alter 90 days to a longer period of time, to not lose so 
   much data?
 * > You can also use the new interface in the admin area to delete posts counts
   data you don’t wish to retain.
 * I’m not sure where the new interface is? How can I find this?
 * Thanks.
 *  Plugin Author [WebberZone](https://wordpress.org/support/users/webberzone/)
 * (@webberzone)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565501)
 * If you’re running 2.2.3 then you can find this under Top 10 > View Popular Posts
 * To change 90 days, you will need to edit the file:
 * [https://wordpress.org/support/topic/automatically-delete-old-data?replies=8#post-7432033](https://wordpress.org/support/topic/automatically-delete-old-data?replies=8#post-7432033)
 *  Thread Starter [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565506)
 * Thanks. I’ve set it to a year. And have also deleted the count to some other 
   posts not needed through the top 10 settings.
 * Time to run maintenance, I’ve left with default to 0. Not sure if this is the
   hour of the day or the time one allows the maintenance to run?
 *  Plugin Author [WebberZone](https://wordpress.org/support/users/webberzone/)
 * (@webberzone)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565563)
 * Time to run maintenance is the time of the day. 0:0 is at midnight.
 * In the next update to the plugin, I’ll add a setting to override the 90 days.
   It will remain as default 90 days, so I suggest disabling maintenance before 
   you update in order not to lose your 365 days setting you’ve modified in the 
   plugin
 *  Thread Starter [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565716)
 * I activated the maintenance mode to daily. And altered the number of days in 
   top-10.php. But no change was made to the tables and data of those older posts.
   I had scheduled the delete to anything older than two years. 720 days.
 * Is there something else I should be doing for this to work?
 * Thanks.
 *  Plugin Author [WebberZone](https://wordpress.org/support/users/webberzone/)
 * (@webberzone)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565717)
 * Are you checking in the wp_top_ten_daily table?
 *  Thread Starter [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565718)
 * Through the WordPress panel, I still seeing the accumulation of views to older
   posts, and no change to wp_top_ten_daily. The only thing I’ve noticed making 
   a change it manually delete count at “Top 10 Popular Posts.”
 *  Plugin Author [WebberZone](https://wordpress.org/support/users/webberzone/)
 * (@webberzone)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565720)
 * When you activate the maintenance mode, the plugin runs a cron job (daily in 
   your case) that will delete all data in the daily table older than 30 days (which
   you’ve changed now to 720). This will cause a change in the count but it would
   reduce the amount of rows (and space) in the daily table.
 * It doesn’t touch the overall tables because that is only 1 entry per post. And,
   it doesn’t stop counting older posts views.
 * Hope that explains how that works.
 *  Thread Starter [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565724)
 * The total impressions per old post (2010, 2009) have not been deleted. I have
   posts with 10,000 views each. I thought it deleted the impression data accumulated
   for that post, resetting it and then counting new views.
 * I’m confused to what this actually does, because I see no change to the impresssions/
   data of older posts. It doesn’t reduce the table weight, unless I manually delete
   the count to specific posts.
 *  Plugin Author [WebberZone](https://wordpress.org/support/users/webberzone/)
 * (@webberzone)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565726)
 * It doesn’t reset overall counts for posts. They are kept in the database since
   they only take a single row. This is the wp_top_ten table
 * What are you noticing on the wp_top_ten_daily table? Are there still database
   base entries where the dp_date is older than the 720 days?
 *  Thread Starter [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565730)
 * Hi,
 * I have 107MB for the wp-top-ten-daily table. I’m trying to reduce its size by
   deleting the count to some posts. I have manually through WordPress > “View Popular
   Posts.” And by doing this, it has improved the size of the that table. Yet, doing
   it manually is a lot of work when there are thousands of posts.
 * I thought by using the cron schedule that anything older than 720 days would 
   exclude some data related with the post count at wp-top-ten-daily. What is happening
   is it remains exactly the same at eye-view.
 * Database table:
    [http://imgur.com/ykf8LUq](http://imgur.com/ykf8LUq)
 * On WordPress, posts from 2010
 * > [View post on imgur.com](https://imgur.com/ykf8LUq)
 *  Thread Starter [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565731)
 * On WordPress, posts from 2010:
    [http://imgur.com/7SXMT9q](http://imgur.com/7SXMT9q)
 * Correct link.
 *  Thread Starter [eladear](https://wordpress.org/support/users/eladear/)
 * (@eladear)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565732)
 * I think I figured out the problem. You were mentioning the count is saved only
   one row, so that shouldn’t be heavy. Even with thousands of posts, because it
   is just a small bit of text.
 * And so I looked at your settings, and the database and there were like 1.7 million
   rows to wp-top-ten-daily, and about 2,500 posts. So something wrong. I’ve been
   using your plugin for some years now, so I think with a past version it duplicated
   the rows and that was creating a massive table.
 * I clicked “merge duplicates across blog IDs” and that reduced the table from 
   107mb to 116KB with 2,480 posts. Much better.
 * I’m going to do a few more tests to see if the count remained the same for most
   posts.
 * Thanks.
 *  Plugin Author [WebberZone](https://wordpress.org/support/users/webberzone/)
 * (@webberzone)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565737)
 * Thank you for the very detailed checking. Please do continue monitoring this.
 * Since you’ve been using this for a long time now, the table might have been victim
   of a duplicate bug that existed a long time ago. For some reason multiple entries
   were created for the same post. Hence, the purpose of the duplicate fix.
 * Note that for the daily table, there is a row for each hour for each post where
   one or more visits are recorded.
 * For the overall, there is a row for each post.

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

The topic ‘The impression data over time is creating a large database. Is there 
a solution’ is closed to new replies.

 * ![](https://ps.w.org/top-10/assets/icon-256x256.png?rev=2986432)
 * [WebberZone Top 10 — Popular Posts](https://wordpress.org/plugins/top-10/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/top-10/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/top-10/)
 * [Active Topics](https://wordpress.org/support/plugin/top-10/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/top-10/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/top-10/reviews/)

## Tags

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

 * 15 replies
 * 2 participants
 * Last reply from: [WebberZone](https://wordpress.org/support/users/webberzone/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/the-impression-data-over-time-is-creating-a-large-database-is-there-a-solution/#post-6565737)
 * Status: not resolved