Closed sunakan closed 19 hours ago
# Query 1: 57.21 QPS, 1.36x concurrency, ID 0xF7144185D9A142A426A36DC55C1D2623 at byte 44788075
# This item is included in the report because it matches --limit.
# Scores: V/M = 0.01
# Time range: 2024-09-22T08:53:33 to 2024-09-22T08:55:03
# Attribute pct total min max avg 95% stddev median
# ============ === ======= ======= ======= ======= ======= ======= =======
# Count 0 5149
# Exec time 26 122s 2ms 84ms 24ms 48ms 16ms 24ms
# Lock time 1 11ms 0 4ms 2us 1us 49us 1us
# Rows sent 10 17.88k 0 11 3.56 4.96 1.85 4.96
# Rows examine 45 54.67M 10.71k 11.08k 10.87k 10.80k 191 10.80k
# Query size 0 281.37k 54 56 55.96 54.21 0.16 54.21
# String:
# Databases isupipe
# Hosts localhost
# Users isucon
# Query_time distribution
# 1us
# 10us
# 100us
# 1ms #########################
# 10ms ################################################################
# 100ms
# 1s
# 10s+
# Tables
# SHOW TABLE STATUS FROM `isupipe` LIKE 'livestream_tags'\G
# SHOW CREATE TABLE `isupipe`.`livestream_tags`\G
# EXPLAIN /*!50100 PARTITIONS*/
SELECT * FROM livestream_tags WHERE livestream_id = 7492\G
livestream_tags#livestream_idにインデックスを貼れば良さそう
alter table livestream_tags add index livestream_id_idx (livestream_id);
cat tmp/db-servers | xargs -I{} ssh {} "sudo mysql isupipe -e 'alter table livestream_tags add index livestream_id_idx (livestream_id);'"
indexが貼れたことを確認
make clean-log
して計測
約3400→約4180
ログをリセット
ベンチマーク実行
スコア:3068
ダウンロード
分析(alp)
分析(pt-query-digest)