Title: Database bloat
Last modified: September 24, 2023

---

# Database bloat

 *  Resolved [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/database-bloat-3/)
 * I noticed a ton of postmeta table entries in our database with a meta_key of “
   id_field”, “filter” and “__defaults_set” (11450 entries each) and others apparently
   tied to NextGen. They all have the same value (eg, “1” for “__defaults_set”).
   Are all these entries necessary? If not, is there a way to clean them out?
 * I started looking into it because we are getting very slow postmeta queries by
   the WordPress core, from the wp-admin/includes/template.php file, meant to get
   custom fields on a post/page edit screen. So, we’re looking to clean that table
   up, if possible.

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

 *  Plugin Contributor [Imagely](https://wordpress.org/support/users/imagely/)
 * (@imagely)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/database-bloat-3/#post-17076067)
 * Hi [@jamminjames](https://wordpress.org/support/users/jamminjames/),
 * Thanks for asking us. We don’t recommend deleting these, as NextGen Gallery stores
   its settings there, and it’d be easy to delete something that’s necessary.
 * We’ll check with the devs to see if they perhaps have any other suggestions.
    -  This reply was modified 2 years, 8 months ago by [Imagely](https://wordpress.org/support/users/imagely/).
    -  This reply was modified 2 years, 8 months ago by [Imagely](https://wordpress.org/support/users/imagely/).
 *  Thread Starter [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/database-bloat-3/#post-17081309)
 * I hope they can fix it so it doesn’t continue to record the same info over and
   over again. It’s a real database bloater, as I said.
 *  Thread Starter [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/database-bloat-3/#post-17084194)
 * Looking into this further, it seems to be recording these entries for every single
   post, whether or not a NextGen gallery is present. Since we have many thousands
   of posts, it really adds up. Please suggest to them that they code it so it only
   records these entries for posts or pages with a NextGen gallery.
 *  Plugin Contributor [Imagely](https://wordpress.org/support/users/imagely/)
 * (@imagely)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/database-bloat-3/#post-17099471)
 * Hi [@jamminjames](https://wordpress.org/support/users/jamminjames/),
 * We have received our developers’ reply mentioning that these meta entries are
   semi-necessary.  If you are not using Pro, you can safely delete them, but they’ll
   get recreated.
 * We plan to replace our whole `DataMapper` system sometime in the future to avoid
   this behavior.
 *  Thread Starter [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * (@jamminjames)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/database-bloat-3/#post-17100705)
 * Okay, thanks.

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

The topic ‘Database bloat’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

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

 * 5 replies
 * 2 participants
 * Last reply from: [jamminjames](https://wordpress.org/support/users/jamminjames/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/database-bloat-3/#post-17100705)
 * Status: resolved