This isn’t a Rails question, more a database one.
If you have an index on the field you’re searching, it will be much faster than if not. Also look into fulltext indexes if using MySQL.
Keep up to date with Rails on Twitter and This Week in Rails
Policies: Conduct, License, Maintenance, Security, Trademarks