From: tedd on 17 Jul 2010 17:17 At 12:09 PM -0400 7/15/10, Daniel P. Brown wrote: >On Thu, Jul 15, 2010 at 11:54, Richard Quadling <rquadling(a)gmail.com> wrote: >> >> I'm looking for is a way to compare what they've entered against a >> known list and to provide my 10 best guesses. > > Look into the following functions and families: > > levenshtein() > similar_text() What would one use to have MySQL do the heavy lifting here? In other words, are there similar MySQL functions? Cheers, tedd PS: I thought of this Friday, but finally got my fingers to work today. -- ------- http://sperling.com http://ancientstones.com http://earthstones.com
From: tedd on 19 Jul 2010 14:46
At 12:39 PM +0100 7/19/10, Richard Quadling wrote: > >I'm using MS SQL, not mySQL. > >Found a extended stored procedure with a UDF. > >Testing it looks excellent. > >Searching for a match on 30,000 vehicles next to no additional time - >a few seconds in total, compared to the over 3 minutes to search using >SQL code. That seems a bit slow. For example, currently I'm searching over 4,000 records (which contains 4,000 paragraphs taken from the text of the King James version of the Bible) for matching words, such as %created% and the times are typically around 0.009 seconds. As such, searching ten times that amount should be in the range of tenths of a second and not seconds -- so taking a few seconds to search 30,000 records seems excessive to me. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com |