Ensuring using database indexes in find-methods with hash-conditions

Please give me links If sbj is described anywhere or was already discussed.

Whether index is used or not depends on order of conditions in WHERE
statement (it was surprise for me; I use mysql).

When one uses hash as conditions he can't control this order.

How does rails solve this problem?