title: How to improve ILIKE Performance?
body: <p>My application has a page where all the cities of a state that start with a particular alphabet are shown.</p>
  
  <p>For ex: </p>
  
  <pre><code>State: Alabama, Page A
  --&gt; All cities in Alabama starting with alphabet 'A'
  </code></pre>
  
  <p>This is my query</p>
  
  <pre><code>City.where(state: 'Alabama').where("name ilike?", "a%")
  </code></pre>
  
  <p>This query takes ~110 - 140 ms. Is there any way in which I can bring down the query time to &lt;10 ms.</p>
  
  <p>Thanks in advance :)</p>