* John Berman > Using mysql 3.28 There is no such version... you probably have version 3.23.something...?
> I have a table with numerous columns and with a index on the surname > column > > In order to give user a choice of searching on an exact name or using > soundex I did the following: > > > Inserted a new field in the table, SURNAME_SDX char(5) > > Populated it from the surname column > > UPDATE global SET SURNAME_SDX = soundex(SURNAME); > > And then indexed SURNAME_SDX > > CREATE INDEX soundex_index ON global (SURNAME_SDX); > > And all works just fine. > > Now this may be a stupid question (but I will ask anyway) > > When I have been adding more data to the table I'm assuming the index > created on the surname column will be updated That is correct, the index is updated automatically. > But I have been dropping the SURNAME_SDX field and then recreating it, > populating it and indexing it. There is no need to re-create the index. As long as you insert soundex(SURNAME) in the SURNAME_SDX column when you add records, and this column has an index, the index will be updated, just like the index on SURNAME. > Am I doing this correctly or is there a quicker way. There is nothing wrong in the way you have been doing it, I suppose it is working just fine? But it is not necessary. Not re-creating the index should save you some time. :) -- Roger -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]