Thank you Albert. You convinced me. I will invest the time to learn full text indexing.
We just turned it on about 2 months ago. We have a screen in which comments for a project (one of multiple components for the project) could be searched. We also wanted to be able to search for a project name, and also that of a company name.
Hence, there was about 2-4 fields, and we always had a "wild card" search.
So, if some company was called
West End Ace furnace and HVAC service?
We want to be able to search for
Ace HVAC
So, we would take each search word (Ace and HVAC) and convert that into
WHERE CompanyName is like '%Ace%' OR CompanyName is like '%HVAC%'
So, our code does a "split" on each word entered, and then we create multiple "like" statements from each word.
(this means the order of words when searching for a company don't matter, since we split out/up each word into a search)
I could also type in
HVAC Ace
Such searching was starting to take about 20 seconds, or more -- closer to 30.
And with 100 users/desktops? (and running free SQL express).
Well, even when say a full table (or full index) scan occurs?
Well, that puts huge loads on SQL server - and stress on the caching of such tables into memory. So, with one user - SQL server can hold a lot of that "bad" search in memory, but with 100 users - you can't, and if you could, you still don't want all that memory being used.
So, we full text indexed the Company name, and we also full text indexed the project name, and then for sub components, there was several more comments and description fields (child rows of the project). So, all in all, the number of rows to search?
In project header - about180,000 rows.
In project components (child of above), about 400,000 rows.
So, after converting the search to full text?
It's gone from 20-30 seconds down to LESS then 1/2 second!!!
(in other words, no perceptible delay exists now....).
So, being able to type in "any" keyword of a company - and order of search words does not matter?
And same for searching project comments?
Full text index performance? It's simply like magic....
Here's a sample of one such search screen: