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

**URL:** <https://www.ruby-forum.com/t/ensuring-using-database-indexes-in-find-methods-with-hash-conditions/131028>\
**Category:** Rails\
**Created:** [March 5, 2008, 10:56am UTC](https://www.ruby-forum.com/t/ensuring-using-database-indexes-in-find-methods-with-hash-conditions/131028 "2008-03-05T10:56:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Artem\_V](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/3be4f8/32.png) [@Artem\_V](https://www.ruby-forum.com/u/Artem_V)\
**Post date:** [March 5, 2008, 10:56am UTC](https://www.ruby-forum.com/t/ensuring-using-database-indexes-in-find-methods-with-hash-conditions/131028/1 "2008-03-05T10:56:10Z")

</div>

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?
