title: Optimizing a Soundex Query for finding similar names
body: <p>My application will offer a list of suggestions for English names that "sound like" a given typed name.</p>
  
  <p>The query will need to be optimized and return results as quick as possible. Which option  would be most optimal for returning results quickly. (Or your own suggestion if you have one)</p>
  
  <p>A. Generate the Soundex Hash and store it in the "Names" table then do something like the following: (This saves generating the soundex hash for at least every row in my db per query right?)  </p>
  
  <blockquote>
    <p>select name from names where NameSoundex = Soundex('Ann')</p>
  </blockquote>
  
  <p>B. Use the Difference function (This must generate the soundex for every name in the table?)  </p>
  
  <blockquote>
    <p>select name from names where Difference(name, 'Ann') >= 3</p>
  </blockquote>
  
  <p>C. Simple comparison</p>
  
  <blockquote>
    <p>select name from names where Soundex(name) = Soundex('Ann')</p>
  </blockquote>
  
  <ul>
  <li><p>Option A seems like to me it would be the fastest to return results because it only generates the Soundex for one string then compares to an indexed column "NameSoundex"</p></li>
  <li><p>Option B should give more results than option A because the name does not have to be an exact match of the soundex, but could be slower</p></li>
  <li><p>Assuming my table could contain millions of rows, what would yield the best results?</p></li>
  </ul>