• Resolved Madhur

    (@madkul24)


    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)
  • 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

    (@proaktion)

    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.