Sql – When should you use full-text indexing

full-text-searchindexingsqlsql-servertsql

We have a whole bunch of queries that "search" for clients, customers, etc. You can search by first name, email, etc. We're using LIKE statements in the following manner:

SELECT * 
FROM customer 
WHERE fname LIKE '%someName%'

Does full-text indexing help in the scenario? We're using SQL Server 2005.

Best Solution

It will depend upon your DBMS. I believe that most systems will not take advantage of the full-text index unless you use the full-text functions. (e.g. MATCH/AGAINST in mySQL or FREETEXT/CONTAINS in MS SQL)

Here is two good articles on when, why, and how to use full-text indexing in SQL Server:

  1. How To Use SQL Server Full-Text Searching
  2. Solving Complex SQL Problems with Full-Text Indexing