root@ip-192-168-0-11:/etc/mysql# mysqldumpslow -s t /tmp/mysql-slow.log
Reading mysql slow query log from /tmp/mysql-slow.log
Count: 1811 Time=0.12s (220s) Lock=0.00s (0s) Rows_sent=1.0 (1756), Rows_examined=37682.4 (68242852), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM isu_condition WHERE jia_isu_uuid = 'S' ORDER BY timestamp DESC LIMIT N
Count: 3591 Time=0.05s (163s) Lock=0.00s (0s) Rows_sent=199.4 (716106), Rows_examined=14406.9 (51735050), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM isu_condition WHERE jia_isu_uuid = 'S' ORDER BY timestamp DESC
Count: 499 Time=0.10s (48s) Lock=0.00s (0s) Rows_sent=231.9 (115732), Rows_examined=24499.5 (12225259), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM isu_condition WHERE jia_isu_uuid = 'S' AND timestamp < 'S' ORDER BY timestamp DESC
Count: 7631 Time=0.00s (38s) Lock=0.00s (0s) Rows_sent=0.0 (0), Rows_examined=0.0 (0), Rows_affected=0.0 (0), isucon[isucon]@localhost
COMMIT
Count: 181510 Time=0.00s (17s) Lock=0.00s (0s) Rows_sent=0.0 (0), Rows_examined=0.0 (0), Rows_affected=0.0 (0), 2users@localhost
Count: 164 Time=0.09s (14s) Lock=0.00s (0s) Rows_sent=465.4 (76322), Rows_examined=23649.3 (3878493), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM isu_condition WHERE jia_isu_uuid = 'S' ORDER BY timestamp ASC
Count: 70919 Time=0.00s (11s) Lock=0.00s (2s) Rows_sent=0.0 (0), Rows_examined=0.0 (0), Rows_affected=1.0 (70919), isucon[isucon]@localhost
INSERT INTO isu_condition (jia_isu_uuid, timestamp, is_sitting, condition, message) VALUES ('S', 'S', N, 'S', 'S')
Count: 47 Time=0.04s (1s) Lock=0.00s (0s) Rows_sent=1.4 (67), Rows_examined=10827.9 (508909), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM isu_condition WHERE jia_isu_uuid = 'S' AND timestamp < 'S' AND 'S' <= timestamp ORDER BY timestamp DESC
Count: 7125 Time=0.00s (1s) Lock=0.00s (0s) Rows_sent=1.0 (7125), Rows_examined=0.0 (120), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT COUNT(*) FROM isu WHERE jia_isu_uuid = 'S'
Count: 1275 Time=0.00s (0s) Lock=0.00s (0s) Rows_sent=2.8 (3591), Rows_examined=7.2 (9207), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM isu WHERE character = 'S'
Count: 1046 Time=0.00s (0s) Lock=0.00s (0s) Rows_sent=1.0 (998), Rows_examined=0.2 (190), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT image FROM isu WHERE jia_user_id = 'S' AND jia_isu_uuid = 'S'
Count: 2611 Time=0.00s (0s) Lock=0.00s (0s) Rows_sent=1.0 (2611), Rows_examined=0.0 (15), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT COUNT(*) FROM user WHERE jia_user_id = 'S'
Count: 297 Time=0.00s (0s) Lock=0.00s (0s) Rows_sent=6.1 (1811), Rows_examined=7.2 (2152), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM isu WHERE jia_user_id = 'S' ORDER BY id DESC
root@ip-192-168-0-11:/etc/mysql# mysqldumpslow -s t /tmp/mysql-slow.log
Reading mysql slow query log from /tmp/mysql-slow.log
Count: 1811 Time=0.12s (220s) Lock=0.00s (0s) Rows_sent=1.0 (1756), Rows_examined=37682.4 (68242852), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM
isu_conditionWHEREjia_isu_uuid= 'S' ORDER BYtimestampDESC LIMIT NCount: 3591 Time=0.05s (163s) Lock=0.00s (0s) Rows_sent=199.4 (716106), Rows_examined=14406.9 (51735050), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM
isu_conditionWHEREjia_isu_uuid= 'S' ORDER BY timestamp DESCCount: 499 Time=0.10s (48s) Lock=0.00s (0s) Rows_sent=231.9 (115732), Rows_examined=24499.5 (12225259), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM
isu_conditionWHEREjia_isu_uuid= 'S' ANDtimestamp< 'S' ORDER BYtimestampDESCCount: 7631 Time=0.00s (38s) Lock=0.00s (0s) Rows_sent=0.0 (0), Rows_examined=0.0 (0), Rows_affected=0.0 (0), isucon[isucon]@localhost
COMMIT
Count: 181510 Time=0.00s (17s) Lock=0.00s (0s) Rows_sent=0.0 (0), Rows_examined=0.0 (0), Rows_affected=0.0 (0), 2users@localhost
Count: 164 Time=0.09s (14s) Lock=0.00s (0s) Rows_sent=465.4 (76322), Rows_examined=23649.3 (3878493), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM
isu_conditionWHEREjia_isu_uuid= 'S' ORDER BYtimestampASCCount: 70919 Time=0.00s (11s) Lock=0.00s (2s) Rows_sent=0.0 (0), Rows_examined=0.0 (0), Rows_affected=1.0 (70919), isucon[isucon]@localhost
INSERT INTO
isu_condition(jia_isu_uuid,timestamp,is_sitting,condition,message) VALUES ('S', 'S', N, 'S', 'S')Count: 47 Time=0.04s (1s) Lock=0.00s (0s) Rows_sent=1.4 (67), Rows_examined=10827.9 (508909), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM
isu_conditionWHEREjia_isu_uuid= 'S' ANDtimestamp< 'S' AND 'S' <=timestampORDER BYtimestampDESCCount: 7125 Time=0.00s (1s) Lock=0.00s (0s) Rows_sent=1.0 (7125), Rows_examined=0.0 (120), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT COUNT(*) FROM
isuWHEREjia_isu_uuid= 'S'Count: 1275 Time=0.00s (0s) Lock=0.00s (0s) Rows_sent=2.8 (3591), Rows_examined=7.2 (9207), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM
isuWHEREcharacter= 'S'Count: 1046 Time=0.00s (0s) Lock=0.00s (0s) Rows_sent=1.0 (998), Rows_examined=0.2 (190), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT
imageFROMisuWHEREjia_user_id= 'S' ANDjia_isu_uuid= 'S'Count: 2611 Time=0.00s (0s) Lock=0.00s (0s) Rows_sent=1.0 (2611), Rows_examined=0.0 (15), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT COUNT(*) FROM
userWHEREjia_user_id= 'S'Count: 297 Time=0.00s (0s) Lock=0.00s (0s) Rows_sent=6.1 (1811), Rows_examined=7.2 (2152), Rows_affected=0.0 (0), isucon[isucon]@localhost
SELECT * FROM
isuWHEREjia_user_id= 'S' ORDER BYidDESC