title: How to implement faster Search As You Type (SAYT) api in Rails 3 application
body: <p>I am having millions of records in my mysql database. I implemented a normal REST api for the iPhone app in Rails 3, but the SAYT feature response is really slow. It takes a lot of time to search the database and return the results. How can I improve the performance?</p>
  
  <p>I have indexed my tables.
  What all aspects should I look more into like MySQL tuning, or  should I use rails sphinx or sunspot? Will that help Please help me with all your expert advices. </p>