Gem update and log slow queries.