Table has columns: user_id
and season_id
Which is faster:
#If I have a database index on user_id
Table.find_all_by_user_id(some_id)
or
#If I have a database index on user_id and season_id
Table.find_all_by_user_id_and_season_id(some_id, another_id)
Is a multi-column index always faster?
For example, is writing a multi-column index slower? If so, I could use the single-column query.
PS. The table has about 1.000.000 records and grows steadily!