Title: Multiple Select queries being called
Last modified: December 7, 2021

---

# Multiple Select queries being called

 *  Resolved [Madhur](https://wordpress.org/support/users/madkul24/)
 * (@madkul24)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/multiple-select-queries-being-called/)
 * We are using Groups Plugin in our WordPress Environment. Recently, we noticed
   that mysqld process was hogging a lot of cpu ( close to 100%) on the vm where
   MySQL DB was present. In the slow query logs, we could find the following query
   being hit numerous times
 * # Time: 2021-12-06T08:38:09.259339Z
    # User@Host: mysqluser[mysqluser] @ {hostname}[
   IP] Id: 18767 # Query_time: 39.002747 Lock_time: 0.000044 Rows_sent: 1 Rows_examined:
   0 SET timestamp=1638779850 SELECT COUNT(*) FROM wp_groups_group;
 * We could trace back this query to the Groups plugin. What could be the reason
   this query is being hit number of times a second?

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

 *  [Tanue Eugen-Bleck Mbunwo](https://wordpress.org/support/users/eugenbleck/)
 * (@eugenbleck)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-select-queries-being-called/#post-15165665)
 * Hi Madkul,
 * Good morning. I trust you are well and safe!
 * Please consider using a cache plugin.
 * STAY SAFE and I wish you a very productive rest of your day!
    Best, Eugen.
 *  Plugin Author [Kento](https://wordpress.org/support/users/proaktion/)
 * (@proaktion)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-select-queries-being-called/#post-15169915)
 * Besides using an appropriate cache, you should look into what’s really causing
   slow database queries – that simple query taking 39 seconds is an indicator of
   a lack of resources IMHO. Take into account that even if you had thousands of
   groups, that query would normally finish in a few milliseconds.

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

The topic ‘Multiple Select queries being called’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups](https://wordpress.org/plugins/groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/groups/)
 * [Active Topics](https://wordpress.org/support/plugin/groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/groups/reviews/)

## Tags

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

 * 2 replies
 * 3 participants
 * Last reply from: [Kento](https://wordpress.org/support/users/proaktion/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/multiple-select-queries-being-called/#post-15169915)
 * Status: resolved