Title: Performance issue with several posts
Last modified: October 11, 2016

---

# Performance issue with several posts

 *  [foxontherock](https://wordpress.org/support/users/foxontherock/)
 * (@foxontherock)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/performance-issue-with-several-posts/)
 * We have a blog with 6000+ articles, that is 9000+ combinations of posts / category.
 * When we added your plugin, we notice a huge cpu overload in our mysql server.
 * After a few research, we found that the query that is executed to get all posts
   is the cause of all our problems.
 * We tried to add wp super cache, but it did not really help.
 * Then, finally, we edited the code to set the “query result” in cache, and it 
   solved the issue.
 * Look at our cpu activity, from our mysql database. We have several other wordpress
   sites running on that mysql. But, only your plugin for 1 single site make the
   cpu move from an average of 5% to 20%.
 * The following image show the issue:
    First part: all our sites without the collapsing
   plugin. 2nd part, with plugin (3 days). 3rd part: with “wp super cache” plugin
   4th part: with the caching. ⌊CPU usage for 2 weeks⌉
 * What we changed in collapscatlist.php:
 *     ```
       $posts = get_transient( $cachekey );
       if ($posts === false){
          $postquery= "select slug, object_id FROM ..."
          set_transient( $cachekey, $posts, 3600*1 );
       }
       ```
   
 * Also, because we know we have more than 5000 rows, we edited the query to return
   only slug and object_id, no other fields are required.

Viewing 1 replies (of 1 total)

 *  Thread Starter [foxontherock](https://wordpress.org/support/users/foxontherock/)
 * (@foxontherock)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/performance-issue-with-several-posts/#post-8287952)
 * Sorry about image link not working, this one should work.
    ⌊2 weeks cpu stats⌉

Viewing 1 replies (of 1 total)

The topic ‘Performance issue with several posts’ is closed to new replies.

 * ![](https://ps.w.org/collapsing-categories/assets/icon-256x256.gif?rev=2886482)
 * [Collapsing Categories](https://wordpress.org/plugins/collapsing-categories/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/collapsing-categories/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/collapsing-categories/)
 * [Active Topics](https://wordpress.org/support/plugin/collapsing-categories/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/collapsing-categories/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/collapsing-categories/reviews/)

## Tags

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

 * 1 reply
 * 1 participant
 * Last reply from: [foxontherock](https://wordpress.org/support/users/foxontherock/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/performance-issue-with-several-posts/#post-8287952)
 * Status: not resolved