# Query 1: 0.00 QPS, 0.00x concurrency, ID 0x4230CEA3DE36DE14 at byte 334559
# Scores: V/M = 0.32
# Time range: 2016-03-13 22:10:24 to 2016-03-14 22:35:44
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 3
# Exec time 19 22s 5s 9s 7s 8s 2s 8s
# Lock time 0 247us 73us 99us 82us 98us 12us 73us
# Rows sent 0 111 37 37 37 37 0 37
# Rows examine 19 13.47M 4.49M 4.49M 4.49M 4.47M 0 4.47M
# Query size 0 1.26k 430 430 430 430 0 430
# String:
# Databases production
# Hosts accounts-appserver4.account-creation-assista...
# Users production
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms
# 10ms
# 100ms
# 1s ################################################################
# 10s+
# Tables
# SHOW TABLE STATUS FROM `production` LIKE 'log'\G
# SHOW CREATE TABLE `production`.`log`\G
# SHOW TABLE STATUS FROM `production` LIKE 'emailtemplate'\G
# SHOW CREATE TABLE `production`.`emailtemplate`\G
# SHOW TABLE STATUS FROM `production` LIKE 'user'\G
# SHOW CREATE TABLE `production`.`user`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT
/* StatsTopCreators::execute()/top5activeout */
COUNT(*),
log.user user_id,
user.username log_user,
user.status user_level
FROM log
LEFT JOIN emailtemplate ON concat('Closed ', emailtemplate.id) = log.action
INNER JOIN user ON user.id = log.user
WHERE
(emailtemplate.oncreated = 1 OR log.action = 'Closed custom-y')
AND user.status != 'Suspended'
GROUP BY user.username, user.id
ORDER BY COUNT(*) DESC\G