1

My host has said one of my sites is using too many sql minutes. I have a list of sql queries (20 in total) which are using the most system resources.

The information starts

'civicrm_tmp_e_gccache_50974519e3a17388f13e9f857d1c2320'
#    SHOW CREATE TABLE `database_civicrm`.`civicrm_tmp_e_gccache_50974519e3a17388f13e9f857d1c2320`
#    SHOW TABLE STATUS FROM `database_civicrm` LIKE 'civicrm_contact'
#    SHOW CREATE TABLE `database_civicrm`.`civicrm_contact`
#    SHOW TABLE STATUS FROM `database_civicrm` LIKE 'civicrm_activity_contact'
#    SHOW CREATE TABLE `database_civicrm`.`civicrm_activity_contact`
#    SHOW TABLE STATUS FROM `database_civicrm` LIKE 'civicrm_activity'
#    SHOW CREATE TABLE `database_civicrm`.`civicrm_activity`
#    SHOW TABLE STATUS FROM `database_civicrm` LIKE 'civicrm_group_contact'
#    SHOW CREATE TABLE `database_civicrm`.`civicrm_group_contact`

How can I match this information up with something my civicrm is doing? This query has run for 172seconds and run 1239 times - although I'm not sure over what time period.

Thanks Caroline

1 Answer 1

1

The gccache one is group contact cache. You probably have a cron job that rebuilds the group contact cache periodically, or it can also happen when the cache expires.

The other ones come from either

  • converting to utf8mb4, which you probably only ran once but it would have run on every table
  • turning on advanced logging (administer - system settings - misc) which also you probably would have only turned on once, but it will also partially run when you do something like add a custom field
2
  • Thanks Demerit. Can I ask a foillow up? I did once turn on advance logging but it is turned off now and I think I did convert to utf8mb4. Are you saying that these thongs will still be impacting on the sql minutes?
    – Caroline B
    Jun 2, 2021 at 7:57
  • Ok, then those two shouldn't anymore.
    – Demerit
    Jun 2, 2021 at 11:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.