Title: Optimizing Bloated Database
Last modified: February 21, 2025

---

# Optimizing Bloated Database

 *  Resolved [baldguy](https://wordpress.org/support/users/baldguy/)
 * (@baldguy)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/optimizing-bloated-database/)
 * I’ve been getting notices from my hosting company that my site is reaching its
   allotted disk size limit. In investigating I’ve discovered that my database is
   423MB, of which ~290MB is from WP Statistics.
 * Yesterday, in Optimization->Data Cleanup, I purged visitor records older than
   90 days. That caused the wp_statistics_visitor table to drop from 235,000 entries
   to 5,900. However, this did not result in a decrease in database size. The wp_statistics_historical
   table is now at 235,000 rows.
 * What I’m seeing is this:
   wp_statistics_historical – 235,578 rows – 65.9MiBwp_statistics_pages–
   12,478 rows – 127.8MiBwp_statistics_visitor – 5,907 rows – 68.9MiBwp_statistics_visitor_relationships–
   14,276 rows – 27.5MiB
 * What are my options for decreasing the size of my database, short of removing
   the plugin and its data and starting over?

Viewing 1 replies (of 1 total)

 *  [Mehmet](https://wordpress.org/support/users/gandomi/)
 * (@gandomi)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/optimizing-bloated-database/#post-18327571)
 * Hi There,
   Thank you for reaching out.Please accept our apologies for the delayed
   response.When you purge data, visitor information is removed from the **wp_statistics_visitor**
   table, and a smaller amount is transferred to the **wp_statistics_historical**
   table. This ensures your visitor and visit counts remain accurate without any
   loss of data.For better optimization, consider **removing query parameters** 
   and **clearing user agents**. You can find more details in our guide: [Optimization & Data Cleanup.](https://wp-statistics.com/resources/optimization-data-cleanup/)
   You can also automate data purging by navigating to **Statistics > Settings >
   Purge Old Data Daily** and enabling Automatic Cleanup.Regards,Mehmet

Viewing 1 replies (of 1 total)

The topic ‘Optimizing Bloated Database’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mehmet](https://wordpress.org/support/users/gandomi/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/optimizing-bloated-database/#post-18327571)
 * Status: resolved