質問するログイン新規登録

回答編集履歴

1

変更

2017/06/07 11:36

投稿

A.Ichi
A.Ichi

スコア4070

answer CHANGED
@@ -3,8 +3,9 @@
3
3
 
4
4
  たぶん下記の3行に効果での(category_id,modified_at)のキーペアだと思われますが
5
5
  on区とwhere区ではitem_idですので上記インデックスは使われません
6
- order byでは結果に対する並び替えですので同様にインデックスは使われないのではないでしょうか。
6
+ order byでは結果に対する並び替えですのでインデックスは使われないのではないでしょうか。(抽出時に有効です)
7
7
 
8
+
8
9
  > left join items on items.id = category_items.item_id
9
10
  > where category_items.item_id = $category_items.item_id
10
11
  > order by modified_at asc limit $number