When using a join-table [:left_id, :right_id]
in Rails, what indices should it have?
I googled for the answer and have only found that people suggest single index containing both keys. But in most cases there's no need to search by both keys simultaneously. You either look up @left.rights
, or @right.lefts
. Am I missing something?