query log from /var/log/mysql/mysql-slow.log Count: 1315 Time=0.04s (53s) Lock=0.00s (0s) Rows=2.7 (3576), isuconp[isuconp]@localhost SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC LIMIT N →この処理が重いとわかる Count: 17 Time=0.04s (0s) Lock=0.00s (0s) Rows=7.1 (121), isuconp[isuconp]@localhost SELECT * FROM `comments` WHERE `post_id` = N ORDER BY `created_at` DESC Count: 1 Time=0.02s (0s) Lock=0.00s (0s) Rows=0.0 (0), isuconp[isuconp]@localhost DELETE FROM posts WHERE id > N Count: 2 Time=0.02s (0s) Lock=0.00s (0s) Rows=9982.0 (19964), isuconp[isuconp]@localhost SELECT `id`, `user_id`, `body`, `mime`, `created_at` FROM `posts` WHERE `created_at` <= 'S' ORDER BY `created_at` DESC ~以下略~