Home

Wednesday, November 25, 2020

SOUNDEX - A real world example

The Works Progress Administration created SOUNDEX in the late 1930's to help the searching and storing of surnames that are pronounced the same but are spelled differently.  Soundex is a way of assigning sound codes to names.  Interestingly, the US government indexed surnames based on SOUNDEX when collecting results of census records.  

Census example below

select SOUNDEX('Smith') 

select SOUNDEX('Smyth') 

select SOUNDEX('Smithe') 

select SOUNDEX('Smythe')  

All Return S530


Other real world use cases

Misspelled words:

select SOUNDEX('Chicken') 

select SOUNDEX('Chikin')  

Both return C500


Other real world use cases

Some states use SOUNDEX to generate license plate numbers

http://www.highprogrammer.com/alan/numbers/dl_us_shared.html



Percentage of Full Table Scans on MYSQL

Below is a useful script I use to determine what percentage of my queries in MYSQL are performing full table scans.  Limiting full table sca...