Open d-shimizu opened 2 years ago
mysql> alter table comments add index post_id_idx(post_id);
Query OK, 0 rows affected (0.74 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> EXPLAIN select * from comments where post_id = 9995 order by created_at desc limit 3 \G
*************************** 1. row ***************************
id: 1
select_type: SIMPLE
table: comments
partitions: NULL
type: ref
possible_keys: post_id_idx
key: post_id_idx
key_len: 4
ref: const
rows: 6
filtered: 100.00
Extra: Using filesort
1 row in set, 1 warning (0.00 sec)
isucon@ip-10-128-1-127:~/private_isu.git/benchmarker$ ./bin/benchmarker -u ./userdata -t http://10.128.1.100
{"pass":true,"score":5448,"success":4619,"fail":0,"messages":[]}