I have a need to search names in our table, but w开发者_JAVA技巧e don't have a FREETEXT
index setup. This isn't an option anymore due to the large amount of data in the table.
Is there any alternatives that I can do? Essentially I'd be looking at doing:
SELECT *
FROM MyTable
WHERE FREETEXT(FirstName, @firstname)
Any ideas or pointers would be greatly appreciated.
Without full text indexes, then you'd maybe consider using
WHERE FirstName LIKE '%' + @firstname+ '%'
However it doesn't scale well (linearly, scan of all rows).
And you have a "large amount of data" which means you really should have full text indexes
精彩评论