• Thanks for the feedback!  I'm glad you found it useful.  UDF's in the WHERE clause do tend to slow down your SELECT statements since they have to perform a row-by-row calculation/comparison to return your final result.  This is especially true in this instance, since SOUNDEX is a very simple and straightforward algorithm that involves encoding a single character at a time; the NYSIIS algorithm is more complex, as it requires several multi-character position-dependent encodings as well as single-character encodings.

    One method that I've used on a table I work with (about 19,000,000 rows and growing) is to generate the SOUNDEX and NYSIIS values for the last name at row insertion time.  This gives the advantage of eliminating the redundant calculations/conversions at SELECT time, and allows me to take advantage of indexes on the lastname_SOUNDEX and lastname_NYSIIS columns.  The down side is that it slows down row INSERTs (not significantly on my current database however), and it takes up more storage space for the extra columns and indexes.

    Additionally, if you find that you are running across a lot of people with the same last name, it might make sense to move the SOUNDEX and NYSIIS encoded values to a separate table using the lastname as the Primary Key, to eliminate a lot of duplicate entries.

    Thanks again.