Title: Database cleaning tool
Last modified: March 20, 2024

---

# Database cleaning tool

 *  [WABetaInfo](https://wordpress.org/support/users/wabetainfo/)
 * (@wabetainfo)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/database-cleaning-tool/)
 * The database can accumulate a large amount of information regarding reactions.
   In my case, wp_wpreactions_reacted_users contains 490830 rows, and the query 
   took 0.3826 seconds. I would like to be able to clean the database by removing
   all reactions while preserving the number of reactions for each post. I think
   this is possible because, when I edit a post, I can add or remove the number 
   of reactions for each emoji. I’d like to have a feature that would group the 
   total number of reactions per emoji for each post and save this information in
   a single row, thus removing all information regarding react_id, react_date, etc…
   Here’s an example:
    1. I initiate the cleaning tool.
    2. The cleaning tool checks the emojis for each post. Let’s assume we’re analyzing
       the post with ID “1”.
    3. The number of reactions for all emojis for the post with ID 1 is extracted.
    4. All rows with bind_id = 1 are deleted.
    5. The previously number of reactions we calculated (third step) is saved in a 
       single row.
    6. The process continues with the next post…
 * For instance, if the post with ID “1” is visited, we check if there are any old
   reactions to add to the count (those we removed previously), and then any new
   reactions are added to the total (the ones added to the database after the cleaning
   process).
 * I hope I’ve explained myself clearly. This tool would help reduce query execution
   times as the number of rows in the table is drastically reduced.”

Viewing 1 replies (of 1 total)

 *  Plugin Author [wpreactions](https://wordpress.org/support/users/wpreactions/)
 * (@wpreactions)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/database-cleaning-tool/#post-17515099)
 * Hi thank you for your request. We will look into this and consider it for a future
   upgrade. We appreciate you taking the time to explain it so well. Have a nice
   day.

Viewing 1 replies (of 1 total)

The topic ‘Database cleaning tool’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-reactions-lite_e9e9e9.svg)
 * [WP Reactions Lite](https://wordpress.org/plugins/wp-reactions-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-reactions-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-reactions-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-reactions-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-reactions-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-reactions-lite/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [wpreactions](https://wordpress.org/support/users/wpreactions/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/database-cleaning-tool/#post-17515099)
 * Status: not resolved