2
我正在使用MySQL,並且需要將一些索引添加到我的表以獲得更好的性能。爲我的Rails應用程序添加數據庫索引
我的一個共同疑問的是這樣的:
arrs = @book.items.where("type = 'A' and status not in ('cancelled','notransportation')").order("item_date, item_time asc")
你會如何建議增加一個索引,將這樣的查詢幫助嗎?