Title: Large database tables on a multisite setup
Last modified: July 16, 2025

---

# Large database tables on a multisite setup

 *  Resolved [malimart](https://wordpress.org/support/users/malimart/)
 * (@malimart)
 * [11 months ago](https://wordpress.org/support/topic/large-database-tables-on-a-multisite-setup/)
 * I have a wordpress multisite setup with many subsites. Some of these have the
   Top 10 plugin activated.
 * I was under the impression that the plugin uses two database tables for every
   subsite:
    - wp_blogid_top_ten
    - wp_blogid_top_ten_daily
 * But on a multisite setup there are also two global tables: wp_top_ten and wp_top_ten_daily.
 *     ```wp-block-code
       mysql> describe wp_top_ten;+------------+--------+------+-----+---------+-------+| Field      | Type   | Null | Key | Default | Extra |+------------+--------+------+-----+---------+-------+| postnumber | bigint | NO   | PRI | NULL    |       || cntaccess  | bigint | NO   |     | NULL    |       || blog_id    | bigint | NO   | PRI | 1       |       |+------------+--------+------+-----+---------+-------+3 rows in set (0.00 sec)mysql> describe wp_top_ten_daily;+------------+----------+------+-----+---------+-------+| Field      | Type     | Null | Key | Default | Extra |+------------+----------+------+-----+---------+-------+| postnumber | bigint   | NO   | PRI | NULL    |       || cntaccess  | bigint   | NO   |     | NULL    |       || dp_date    | datetime | NO   | PRI | NULL    |       || blog_id    | bigint   | NO   | PRI | 1       |       |+------------+----------+------+-----+---------+-------+4 rows in set (0.01 sec)
       ```
   
 * What exactly is stored in the wp_top_ten_daily table on a wp multisite setup?
   The table currently has over 9 million rows and is growing fast. Is there anything
   I can do about that?

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

 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [11 months ago](https://wordpress.org/support/topic/large-database-tables-on-a-multisite-setup/#post-18559617)
 * Hi [@malimart](https://wordpress.org/support/users/malimart/)
 * You’re right on single set of tables across multisite. This ensures efficient
   queries when loading popular posts across the multisite.
 * The daily table holds hourly hits per post per blog and hence why it is much 
   bigger in size. There is a maintenance cron available per site to clear any posts
   older than the default 180 day period. You can enable this in the Settings page.
 * These are used to display the custom period (daily) popular posts. It also powers
   the dashboard in the admin area.
 * Please see this article for more information [https://webberzone.com/support/knowledgebase/top-10-maintenance-options/](https://webberzone.com/support/knowledgebase/top-10-maintenance-options/)
 *  Thread Starter [malimart](https://wordpress.org/support/users/malimart/)
 * (@malimart)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/large-database-tables-on-a-multisite-setup/#post-18730399)
 * I have one more question about the database tables in a multisite setup.
 * I can see that the plugin now uses two global tables: `wp_top_ten_daily` and `
   wp_top_ten`.
 * However, on some subsites where the plugin is active, there are also site-specific
   tables. For example, the blog with ID 5787 has two tables: `wp_5787_top_ten` 
   and `wp_5787_top_ten_daily`.
 * From what I can tell, these site-specific tables are no longer used. I tested
   deleting them and it had no effect on the statistics for that blog or on the 
   plugin’s functionality, since all the data appears to be stored in the two global
   tables.
 * My assumption is that an older version of the plugin used the per-blog tables,
   and the current version has migrated everything to the global tables.
 * Can you confirm that it’s safe to remove the `wp_XXXX_top_ten` and `wp_XXXX_top_ten_daily`
   tables for each blog?
 *  Plugin Author [Ajay](https://wordpress.org/support/users/ajay/)
 * (@ajay)
 * [6 months, 2 weeks ago](https://wordpress.org/support/topic/large-database-tables-on-a-multisite-setup/#post-18732417)
 * If your installation is very old then you’d see the original tables per site.
   A long time back I moved to the single set of tables and had a migrator in place.
 * If you’re noticing no issues with the stats then you can safely delete these.
   Of course please backup before you do so.

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

The topic ‘Large database tables on a multisite setup’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ajay](https://wordpress.org/support/users/ajay/)
 * Last activity: [6 months, 2 weeks ago](https://wordpress.org/support/topic/large-database-tables-on-a-multisite-setup/#post-18732417)
 * Status: resolved